Versions in this module Expand all Collapse all v1 v1.0.0 Nov 10, 2021 Changes in this version + var ErrEmpty = errors.New("dque is empty") + var ErrQueueClosed = errors.New("queue is closed") + type DQue struct + DirPath string + Name string + func New(name string, dirPath string, itemsPerSegment int, builder func() interface{}) (*DQue, error) + func NewOrOpen(name string, dirPath string, itemsPerSegment int, builder func() interface{}) (*DQue, error) + func Open(name string, dirPath string, itemsPerSegment int, builder func() interface{}) (*DQue, error) + func (q *DQue) Close() error + func (q *DQue) Dequeue() (interface{}, error) + func (q *DQue) DequeueBlock() (interface{}, error) + func (q *DQue) Enqueue(obj interface{}) error + func (q *DQue) Peek() (interface{}, error) + func (q *DQue) PeekBlock() (interface{}, error) + func (q *DQue) SegmentNumbers() (int, int) + func (q *DQue) Size() int + func (q *DQue) SizeUnsafe() int + func (q *DQue) Turbo() bool + func (q *DQue) TurboOff() error + func (q *DQue) TurboOn() error + func (q *DQue) TurboSync() error + type ErrCorruptedSegment struct + Err error + Path string + func (e ErrCorruptedSegment) Error() string + func (e ErrCorruptedSegment) Unwrap() error + type ErrUnableToDecode struct + Err error + Path string + func (e ErrUnableToDecode) Error() string + func (e ErrUnableToDecode) Unwrap() error