Documentation ¶
Overview ¶
Package queue provides TimeBoundedQueue
the queue items are dequeued non-deterministically, but time bounds are set
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicTBQueue ¶
type BasicTBQueue struct {
// contains filtered or unexported fields
}
implements TimeBoundedQueue
func (*BasicTBQueue) Enqueue ¶
func (this *BasicTBQueue) Enqueue(item_ TimeBoundedQueueItem) error
func (*BasicTBQueue) GetDequeueChan ¶
func (this *BasicTBQueue) GetDequeueChan() chan TimeBoundedQueueItem
type BasicTBQueueItem ¶
type BasicTBQueueItem struct {
// contains filtered or unexported fields
}
implements TimeBoundedQueueItem
func NewBasicTBQueueItem ¶
func NewBasicTBQueueItem(value interface{}, minDuration, maxDuration time.Duration) (*BasicTBQueueItem, error)
func (*BasicTBQueueItem) EnqueuedTime ¶
func (this *BasicTBQueueItem) EnqueuedTime() time.Time
func (*BasicTBQueueItem) MaxDuration ¶
func (this *BasicTBQueueItem) MaxDuration() time.Duration
func (*BasicTBQueueItem) MinDuration ¶
func (this *BasicTBQueueItem) MinDuration() time.Duration
func (*BasicTBQueueItem) Value ¶
func (this *BasicTBQueueItem) Value() interface{}
type TimeBoundedQueue ¶
type TimeBoundedQueue interface { // enqueue Enqueue(TimeBoundedQueueItem) error // get channel for dequeue GetDequeueChan() chan TimeBoundedQueueItem }
concurrent-safe, time-bounded queue.
designed for ExplorePolicies.
func NewBasicTBQueue ¶
func NewBasicTBQueue() TimeBoundedQueue
Click to show internal directories.
Click to hide internal directories.