Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendIDGetter ¶
type BackendIDGetter interface {
GetBackendID() int64
}
type EtcdGetter ¶
type EtcdGetter struct { Client *clientv3.Client BackendIDGetter BackendIDGetter }
EtcdGetter provides access to the etcd client for creating a new queue.
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
Item is a Queue item.
func (*Item) Ack ¶
Ack acknowledges the Item has been received and processed, and deletes it from the in flight lane.
type Memory ¶
Memory is an implementation of types.Queue in memory, provided for testing purposes.
type MemoryGetter ¶
type MemoryGetter struct {
// contains filtered or unexported fields
}
MemoryGetter is a types.QueueGetter.
func NewMemoryGetter ¶
func NewMemoryGetter() *MemoryGetter
NewMemoryGetter creates a new MemoryGetter.
type MemoryItem ¶
type MemoryItem struct {
// contains filtered or unexported fields
}
MemoryItem is an item from MemoryQueue.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue is a non-durable FIFO queue that is backed by etcd. When an item is received by a client, it is deleted from the work lane, and added to the in-flight lane. The item stays in the in-flight lane until it is Acked by the client, or returned to the work lane with Nack.
func New ¶
func New(name string, client *clientv3.Client, backendIDGetter BackendIDGetter) *Queue
New returns an instance of Queue.