Documentation ¶
Index ¶
- Variables
- type Config
- type InMemoryQueue
- func (i *InMemoryQueue) BlockingPop(ctx context.Context) (Task, error)
- func (i *InMemoryQueue) BlockingPush(ctx context.Context, task Task) error
- func (i *InMemoryQueue) NonBlockingPop(ctx context.Context) (Task, error)
- func (i *InMemoryQueue) NonBlockingPush(ctx context.Context, task Task) error
- func (i *InMemoryQueue) Pop(ctx context.Context) (Task, error)
- func (i *InMemoryQueue) Push(ctx context.Context, task Task) error
- type Queue
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorQueueFull = errors.New("queue was full") ErrorQueueEmpty = errors.New("queue was empty") )
Functions ¶
This section is empty.
Types ¶
type InMemoryQueue ¶
type InMemoryQueue struct { Config // contains filtered or unexported fields }
func NewInMemoryQueue ¶
func NewInMemoryQueue(config Config) *InMemoryQueue
func (*InMemoryQueue) BlockingPop ¶
func (i *InMemoryQueue) BlockingPop(ctx context.Context) (Task, error)
func (*InMemoryQueue) BlockingPush ¶
func (i *InMemoryQueue) BlockingPush(ctx context.Context, task Task) error
func (*InMemoryQueue) NonBlockingPop ¶
func (i *InMemoryQueue) NonBlockingPop(ctx context.Context) (Task, error)
func (*InMemoryQueue) NonBlockingPush ¶
func (i *InMemoryQueue) NonBlockingPush(ctx context.Context, task Task) error
Click to show internal directories.
Click to hide internal directories.