Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checkpointer ¶
type Checkpointer interface {
Set(settings *proto.QueueConfig, task *proto.Task)
}
A Checkpointer saves a checkpoint based on a task.
type QueryFactory ¶
type QueryFactory interface {
Query(settings *proto.QueueConfig) storage.TaskRange
}
A QueryFactory generates task queries.
type Reader ¶
type Reader interface { // Ready signals whether Read *should* be invoked. // // This can be used to prevent concurrent Reads // if the Read operation will take a long time. Ready() bool // Read should call f on each task in the collection. Read(f func(task *proto.Task) error) error }
A Reader reads tasks from a collection.
type TaskStream ¶
A TaskStream is an unbounded collection of tasks.
type TaskWriter ¶
type TaskWriter interface { // Push should add tasks to the collection. // // isFollower indicates whether this operation is // being performed on a cluster follower (as opposed // to the leader). Push(tasks []*proto.Task, isFollower bool) error // Acknowledge should apply task acknowledgements // to the collection. Acknowledge(acks []*proto.Ack) error // Close should release all resources needed to // safely destroy the TaskWriter object. Close() error }
A TaskWriter writes task-related entities to a collection.
func NewTaskWriter ¶
func NewTaskWriter(tasks *storage.TaskStore) TaskWriter
Click to show internal directories.
Click to hide internal directories.