goalpost is an embeddable, durable worker queue for golang
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
package goalpost
|
|
|
|
import "context"
|
|
|
|
//Worker represents a worker for handling Jobs
|
|
type Worker interface {
|
|
//DoWork is called when a worker picks up a job from the queue
|
|
//Context can be used for cancelling jobs early when Close
|
|
//is called on the Queue
|
|
DoWork(context.Context, *Job) error
|
|
//ID is a semi-unique identifier for a worker
|
|
//it is primarily used for logging purposes
|
|
ID() string
|
|
}
|