Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DoublyLinked ¶
type DoublyLinked struct {
// contains filtered or unexported fields
}
DoublyLinked for simple queue using buffer channel
func NewDoublyLinked ¶
func NewDoublyLinked(size int) *DoublyLinked
NewDoublyLinked for create new DoublyLinked instance
func (*DoublyLinked) Queue ¶
func (s *DoublyLinked) Queue(task core.QueuedMessage) error
Queue send task to the buffer channel
func (*DoublyLinked) Request ¶
func (s *DoublyLinked) Request() (core.QueuedMessage, error)
Request a new task from channel
func (*DoublyLinked) Run ¶
func (s *DoublyLinked) Run(ctx context.Context, task core.QueuedMessage) error
Run to execute new task
Click to show internal directories.
Click to hide internal directories.