Versions in this module Expand all Collapse all v0 v0.0.3 Jun 15, 2021 Changes in this version + const QueueErrorCodeEmptyQueue + const QueueErrorCodeFullCapacity + const QueueErrorCodeIndexOutOfBounds + const QueueErrorCodeInternalChannelClosed + const QueueErrorCodeLockedQueue + const WaitForNextElementChanCapacity + type FIFO struct + func NewFIFO() *FIFO + func (st *FIFO) Dequeue() (interface{}, error) + func (st *FIFO) DequeueOrWaitForNextElement() (interface{}, error) + func (st *FIFO) DequeueOrWaitForNextElementContext(ctx context.Context) (interface{}, error) + func (st *FIFO) Enqueue(value interface{}) error + func (st *FIFO) Get(index int) (interface{}, error) + func (st *FIFO) GetCap() int + func (st *FIFO) GetLen() int + func (st *FIFO) IsLocked() bool + func (st *FIFO) Lock() + func (st *FIFO) Remove(index int) error + func (st *FIFO) RemoveByKey(key interface{}) error + func (st *FIFO) Unlock() + type FixedFIFO struct + func NewFixedFIFO(capacity int) *FixedFIFO + func (st *FixedFIFO) Dequeue() (interface{}, error) + func (st *FixedFIFO) DequeueOrWaitForNextElement() (interface{}, error) + func (st *FixedFIFO) DequeueOrWaitForNextElementContext(ctx context.Context) (interface{}, error) + func (st *FixedFIFO) Enqueue(value interface{}) error + func (st *FixedFIFO) GetCap() int + func (st *FixedFIFO) GetLen() int + func (st *FixedFIFO) IsLocked() bool + func (st *FixedFIFO) Lock() + func (st *FixedFIFO) Unlock() + type Queue interface + Dequeue func() (interface{}, error) + DequeueOrWaitForNextElement func() (interface{}, error) + DequeueOrWaitForNextElementContext func(context.Context) (interface{}, error) + Enqueue func(interface{}) error + GetCap func() int + GetLen func() int + IsLocked func() bool + Lock func() + Unlock func() + type QueueError struct + func NewQueueError(code string, message string) *QueueError + func (st *QueueError) Code() string + func (st *QueueError) Error() string