redisqueue

package
v0.0.0-pre.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2018 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue struct {
	Prefix string
	Pool   *redis.Pool
}

Queue is a queue

func New

func New(prefix string, pool *redis.Pool) *Queue

New returns a new Queue

func (*Queue) Peek

func (q *Queue) Peek(ctx context.Context, queueName string, count int64) ([]*queue.WebRequest, error)

Peek show the next few items in the queue

func (*Queue) Pop

func (q *Queue) Pop(ctx context.Context, queueName string, timeout time.Duration) (*queue.WebRequest, error)

Pop pops the next item off the queue

func (*Queue) Push

func (q *Queue) Push(ctx context.Context, queueName string, webRequests []*queue.WebRequest) error

Push adds to the queue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL