Documentation
¶
Overview ¶
a parallel operation queue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
type Operation interface {
// Identifier for the operation's queue. Operations with the same key will be
// executed in the order in which they were pushed. Operations with different
// keys will be executed concurrently.
Key() string
// Work to execute when the operation is popped off of the queue.
Execute()
}
The Operation interface is implemented externally, by the user of the queue.
type Queue ¶
type Queue interface {
// Enqueue an operation for execution.
Push(Operation)
}
Queue executes operations, parallelized by operation key.
func NewSlidingQueue ¶
NewSlidingQueue returns a queue that will buffer up to `capacity` operations per key. When capacity is exceeded, older operations are dequeued to make room.
Directories
¶
| Path | Synopsis |
|---|---|
|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.