Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (21 sloc) 537 Bytes
package queue
import (
"context"
"github.com/mongodb/amboy"
)
// Driver describes the interface between a queue and an out of
// process persistence layer, like a database.
type Driver interface {
ID() string
Open(context.Context) error
Close()
Get(string) (amboy.Job, error)
Put(amboy.Job) error
Save(amboy.Job) error
SaveStatus(amboy.Job, amboy.JobStatusInfo) error
Jobs() <-chan amboy.Job
Next(context.Context) amboy.Job
Stats() amboy.QueueStats
JobStats(context.Context) <-chan amboy.JobStatusInfo
LockManager
}