Documentation
¶
Index ¶
- type Config
- type Queue
- func (q *Queue) Add(op *operation.QueuedOperation, protocolGenesisTime uint64) (uint, error)
- func (q *Queue) Len() uint
- func (q *Queue) Peek(num uint) (operation.QueuedOperationsAtTime, error)
- func (q *Queue) Remove(num uint) (ops operation.QueuedOperationsAtTime, ack func() uint, nack func(), err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
PoolSize uint
}
Config contains configuration parameters for the operation queue.
type Queue ¶
Queue implements an operation queue that uses a publisher/subscriber.
func (*Queue) Peek ¶
func (q *Queue) Peek(num uint) (operation.QueuedOperationsAtTime, error)
Peek returns (up to) the given number of operations from the head of the queue but does not remove them.
func (*Queue) Remove ¶
func (q *Queue) Remove(num uint) (ops operation.QueuedOperationsAtTime, ack func() uint, nack func(), err error)
Remove removes (up to) the given number of items from the head of the queue. Returns the actual number of items that were removed and the new length of the queue. Each removed message is acknowledged, indicating that it was successfully processed. If the server goes down with messages still in the queue then, if using a durable message queue, the messages will be delivered to another server instance which is processing from the same queue.