disque

package module
v0.0.0-...-aabaef8 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2018 License: MIT Imports: 2 Imported by: 0

README

go-disque

Travis Coveralls GoDoc

Go client for Disque, the Persistent Distributed Job Priority Queue.

License

go-disque is licensed under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOptions

type AddOptions struct {
	Async     bool          `redis:"-"`
	Delay     time.Duration `redis:"-"`
	MaxLen    uint          `redis:"MAXLEN,omitempty"`
	Replicate uint16        `redis:"REPLICATE,omitempty"`
	Retry     time.Duration `redis:"-"`
	TTL       time.Duration `redis:"-"`
}

type GetOptions

type GetOptions struct {
	Count        uint          `redis:"COUNT,omitempty"`
	NoHang       bool          `redis:"-"`
	Timeout      time.Duration `redis:"-"`
	WithCounters bool          `redis:"-"`
}

type Job

type Job struct {
	Queue, ID, Body             string
	Nacks, AdditionalDeliveries int64
}

type Pool

type Pool struct{ redis.Pool }

func New

func New(addr string, idleTimeout time.Duration) *Pool

func (*Pool) Ack

func (p *Pool) Ack(jobs ...Job) error

func (*Pool) Add

func (p *Pool) Add(q, job string, t time.Duration, o *AddOptions) (string, error)

func (*Pool) FastAck

func (p *Pool) FastAck(jobs ...Job) error

func (*Pool) Get

func (p *Pool) Get(o *GetOptions, q ...string) ([]Job, error)

func (*Pool) Len

func (p *Pool) Len(queue string) (int, error)

func (*Pool) Nack

func (p *Pool) Nack(jobs ...Job) error

func (*Pool) Ping

func (p *Pool) Ping() (string, error)

func (*Pool) Stat

func (p *Pool) Stat(queue string) (map[string]interface{}, error)

func (*Pool) Working

func (p *Pool) Working(job Job) (time.Duration, error)

Jump to

Keyboard shortcuts

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