work

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(j worker)

func Dispatch

func Dispatch(j worker) error

func Process

func Process(jobName string)

func RegisterQueue

func RegisterQueue()

Types

type Job

type Job struct {
	// contains filtered or unexported fields
}

func (*Job) Delay

func (j *Job) Delay() zone.Duration

Delay default no delay

func (*Job) Handle

func (j *Job) Handle(paramPtr proto.Message) error

func (*Job) Name

func (j *Job) Name() string

func (*Job) ParamProto

func (j *Job) ParamProto() proto.Message

func (*Job) Retries

func (j *Job) Retries() uint32

Retries default retry 3 times

func (*Job) SetDelay

func (j *Job) SetDelay(delay zone.Duration)

SetDelay default no delay

func (*Job) SetParam

func (j *Job) SetParam(paramPtr proto.Message)

Jump to

Keyboard shortcuts

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