Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Feed ¶
type Feed struct { Settings *storage.SyncedSettings // contains filtered or unexported fields }
Feed provides access to a stream of tasks that are ready to be delivered.
func (*Feed) Close ¶
Close stops the feed from listening to ready tasks.
This method must be called once after the feed is no longer needed.
func (*Feed) Tasks ¶
func (f *Feed) Tasks() q.TaskStream
type Lease ¶
type Lease struct {
// contains filtered or unexported fields
}
Lease is a handle on a task feed.
Release should be called as soon as the lease is no longer needed.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager ensures that only one feed is active per requested queue.
func NewManager ¶
func NewManager(db *storage.PebbleClient, raft *raft.Raft) *Manager
type TaskBroker ¶
type TaskBroker struct {
// contains filtered or unexported fields
}
TaskBroker manages the read and ack streams of a task feed.
func NewTaskBroker ¶
func NewTaskBroker( stream proto.Queue_PullServer, fm *Manager, raft *raft.Raft, ) *TaskBroker
func (*TaskBroker) Close ¶
func (tb *TaskBroker) Close() error
func (*TaskBroker) Start ¶
func (tb *TaskBroker) Start() error
Click to show internal directories.
Click to hide internal directories.