Documentation ¶
Overview ¶
Package queue implements various types of interfaces.Queuer
Index ¶
- type Redis
- func (queue *Redis) Connect() error
- func (queue *Redis) CountItems(key string) (int, error)
- func (queue *Redis) Disconnect() error
- func (queue *Redis) Fetch(key string) ([]byte, error)
- func (queue *Redis) FetchMany(key string, count int) ([][]byte, error)
- func (queue *Redis) Purge(key string) error
- func (queue *Redis) Push(key string, data []byte) error
- func (queue *Redis) PushMany(key string, data [][]byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Redis ¶
type Redis struct {
// contains filtered or unexported fields
}
Redis implements a Redis queue using the LIST datastructure
func NewRedis ¶
NewRedis creates a new instance of a Redis queue endpoint is the full URL of the Redis endpoint database is the Redis database number to use popTimeout is the time a BLPOP call will wait before continuing
func (*Redis) CountItems ¶
CountItems counts the amount of items in the given queue
func (*Redis) Fetch ¶
Fetch retrieves a single item from the queue at key and returns a byte slice of data
func (*Redis) FetchMany ¶
FetchMany retrieves up to the specified count from the queue at key and returns a slive of byte slices
Click to show internal directories.
Click to hide internal directories.