Versions in this module Expand all Collapse all v1 v1.1.1 Jan 12, 2018 Changes in this version + const DEFAULT_MAX_RETRY + const LAYOUT + const NanoSecondPrecision + const RETRY_KEY + const SCHEDULED_JOBS_KEY + var Config *config + var Middleware = NewMiddleware(&MiddlewareLogging{}, &MiddlewareRetry{}, &MiddlewareStats{}) + func BeforeStart(f func()) + func Configure(options map[string]string) + func DuringDrain(f func()) + func Enqueue(queue, class string, args interface{}) (string, error) + func EnqueueAt(queue, class string, at time.Time, args interface{}) (string, error) + func EnqueueIn(queue, class string, in float64, args interface{}) (string, error) + func EnqueueWithOptions(queue, class string, args interface{}, opts EnqueueOptions) (string, error) + func Process(queue string, job jobFunc, concurrency int, mids ...Action) + func Quit() + func ResetManagers() error + func Run() + func Start() + func Stats(w http.ResponseWriter, req *http.Request) + func StatsServer(port int) + type Action interface + Call func(queue string, message *Msg, next func() bool) bool + type Args struct + func (d Args) Equals(other interface{}) bool + func (d Args) ToJson() string + type EnqueueData struct + Args interface{} + Class string + EnqueuedAt float64 + Jid string + Queue string + type EnqueueOptions struct + At float64 + Retry bool + RetryCount int + type Fetcher interface + Acknowledge func(*Msg) + Close func() + Closed func() bool + Fetch func() + FinishedWork func() chan bool + Messages func() chan *Msg + Queue func() string + Ready func() chan bool + func NewFetch(queue string, messages chan *Msg, ready chan bool) Fetcher + type MiddlewareLogging struct + func (l *MiddlewareLogging) Call(queue string, message *Msg, next func() bool) (acknowledge bool) + type MiddlewareRetry struct + func (r *MiddlewareRetry) Call(queue string, message *Msg, next func() bool) (acknowledge bool) + type MiddlewareStats struct + func (l *MiddlewareStats) Call(queue string, message *Msg, next func() bool) (acknowledge bool) + type Middlewares struct + func NewMiddleware(actions ...Action) *Middlewares + func (m *Middlewares) Append(action Action) + func (m *Middlewares) Prepend(action Action) + type Msg struct + func NewMsg(content string) (*Msg, error) + func (d Msg) Equals(other interface{}) bool + func (d Msg) ToJson() string + func (m *Msg) Args() *Args + func (m *Msg) Jid() string + func (m *Msg) OriginalJson() string + type WorkersLogger interface + Printf func(string, ...interface{}) + Println func(...interface{}) + var Logger WorkersLogger = log.New(os.Stdout, "workers: ", log.Ldate | log.Lmicroseconds)