Documentation
¶
Index ¶
Constants ¶
View Source
const ( // TakeoverIdleTimeout is intentionally more aggressive than passive cleanup: // a new reservation for the same tuple is direct evidence of demand. TakeoverIdleTimeout = 5 * time.Minute // CleanupIdleTimeout must remain at least TakeoverIdleTimeout so background // cleanup is no more aggressive than an explicit reservation takeover. CleanupIdleTimeout = 15 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func Inactive ¶
Inactive returns the canonical idle-session predicate used by both candidate selection and fenced deletion.
func InactiveByID ¶
InactiveByID scopes the canonical idle-session predicate to one upload.
Types ¶
type DeleteResult ¶
type DeleteResult struct {
Deleted bool
Task *ent.StorageDeletion
}
DeleteResult reports whether a conditional deletion committed and carries the durable outbox task for callers that process deletions inline.
func DeleteIfInactive ¶
func DeleteIfInactive(ctx context.Context, db *ent.Client, uploadID int64, folderName string, cutoff int64) (DeleteResult, error)
DeleteIfInactive atomically deletes an idle upload and enqueues its folder. A concurrent activity refresh or deletion returns a zero DeleteResult.
Click to show internal directories.
Click to hide internal directories.