Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = errors.New("not found in database")
Functions ¶
func AddToQueue ¶
func AddToQueue(fileID string, providers []string, sr *types.StorageRequest) error
AddToQueue takes information about a file and creates queue items for each provider.
func SetComplete ¶
SetComplete sets a queue item as complete (success) and stores the access information in the database. It also sets it as no longer taken.
Types ¶
type QueueItem ¶
type QueueItem struct { RowID int64 FileID string StorageRequest *types.StorageRequest Provider string Status types.UploadStatus }
func NextInQueue ¶
NextInQueue returns the next item in the database queue. It assumes the caller is going to operate on this item and eventually remove it from the queue, so it sets 'taken' to true.
'status' is not set to in-progress, the caller must do that.
If ErrNotFound is returned that means the queue is empty.
Click to show internal directories.
Click to hide internal directories.