Documentation ¶
Index ¶
- type IterateOperation
- type Queue
- func (q *Queue) Add(task interface{})
- func (q *Queue) AddWatcher(queueWatcher QueueWatcher)
- func (q *Queue) ChangesDisable()
- func (q *Queue) ChangesEnable(runCallbackOnPreviousChanges bool)
- func (q *Queue) IsEmpty() bool
- func (q *Queue) IterateWithLock(operation IterateOperation) io.Reader
- func (q *Queue) Length() int
- func (q *Queue) Peek() (task interface{}, err error)
- func (q *Queue) Pop() (task interface{})
- func (q *Queue) Push(task interface{})
- func (q *Queue) WithLock(operation TaskOperation) string
- type QueueWatcher
- type TaskOperation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IterateOperation ¶
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func (*Queue) AddWatcher ¶
func (q *Queue) AddWatcher(queueWatcher QueueWatcher)
AddWatcher adds queue watcher.
func (*Queue) ChangesDisable ¶
func (q *Queue) ChangesDisable()
func (*Queue) ChangesEnable ¶
Включить вызов QueueChangeCallback при каждом изменении В паре с ChangesDisabled могут быть использованы, чтобы производить массовые изменения. Если runCallbackOnPreviousChanges true, то будет вызвана QueueChangeCallback
func (*Queue) IterateWithLock ¶
func (q *Queue) IterateWithLock(operation IterateOperation) io.Reader
IterateWithLock executes operation on all elements of the queue with a queue lock.
func (*Queue) Push ¶
func (q *Queue) Push(task interface{})
Push pushes the element as the first element.
func (*Queue) WithLock ¶
func (q *Queue) WithLock(operation TaskOperation) string
WithLock executes operation on the first element of the queue with a queue lock.
type QueueWatcher ¶
type QueueWatcher interface {
QueueChangeCallback()
}
type TaskOperation ¶
type TaskOperation func(topTask interface{}) string
Тип метода — операция над первым элементом очереди
Click to show internal directories.
Click to hide internal directories.