-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Although the current state works great, think about changing DQue as the return of New() to an interface. This makes it much easier for testing purposes. A dummy implementation of the interface would avoid any write/lock implications during testing.
type DQue interface {
Close() error
Enqueue(obj interface{}) error
Dequeue() (interface{}, error)
Peek() (interface{}, error)
DequeueBlock() (interface{}, error)
PeekBlock() (interface{}, error)
Size() int
SizeUnsafe() int
SegmentNumbers() (int, int)
Turbo() bool
TurboOn() error
TurboOff() error
TurboSync() error
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels