Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CircularBuffer ¶
CircularBuffer for simple queue using buffer channel
func NewCircularBuffer ¶
func NewCircularBuffer(size int) *CircularBuffer
NewCircularBuffer for create new CircularBuffer instance
func (*CircularBuffer) IsEmpty ¶
func (s *CircularBuffer) IsEmpty() bool
IsEmpty returns true if queue is empty
func (*CircularBuffer) IsFull ¶
func (s *CircularBuffer) IsFull() bool
IsFull returns true if queue is full
func (*CircularBuffer) Queue ¶
func (s *CircularBuffer) Queue(task core.QueuedMessage) error
Queue send task to the buffer channel
func (*CircularBuffer) Request ¶
func (s *CircularBuffer) Request() (core.QueuedMessage, error)
Request a new task from channel
Click to show internal directories.
Click to hide internal directories.