Documentation ¶
Index ¶
- type Configurer
- type Driver
- func (c *Driver) Pause(ctx context.Context, p string) error
- func (c *Driver) Push(ctx context.Context, job jobs.Message) error
- func (c *Driver) Resume(ctx context.Context, p string) error
- func (c *Driver) Run(ctx context.Context, p jobs.Pipeline) error
- func (c *Driver) State(ctx context.Context) (*jobs.State, error)
- func (c *Driver) Stop(ctx context.Context) error
- type Item
- func (i *Item) Ack() error
- func (i *Item) Body() []byte
- func (i *Item) Context() ([]byte, error)
- func (i *Item) GroupID() string
- func (i *Item) Headers() map[string][]string
- func (i *Item) ID() string
- func (i *Item) Nack() error
- func (i *Item) Priority() int64
- func (i *Item) Requeue(headers map[string][]string, _ int64) error
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configurer ¶
type Driver ¶ added in v4.1.0
type Driver struct {
// contains filtered or unexported fields
}
func FromConfig ¶
func FromPipeline ¶
type Item ¶
type Item struct { // Job contains name of job broker (usually PHP class). Job string `json:"job"` // Ident is unique identifier of the job, should be provided from outside Ident string `json:"id"` // Payload is string data (usually JSON) passed to Job broker. Payload []byte `json:"payload"` // Options contains set of PipelineOptions specific to job execution. Can be empty. Options *Options `json:"options,omitempty"` // contains filtered or unexported fields }
type Options ¶
type Options struct { // Priority is job priority, default - 10 Priority int64 `json:"priority"` // Pipeline manually specified pipeline. Pipeline string `json:"pipeline,omitempty"` // Delay defines time duration to delay execution for. Defaults to none. Delay int64 `json:"delay,omitempty"` // AutoAck option AutoAck bool `json:"auto_ack"` // Nats JET-streamID name Queue string // contains filtered or unexported fields }
Options carry information about how to handle given job.
func (*Options) DelayDuration ¶
DelayDuration returns delay duration in a form of time.Duration.
Click to show internal directories.
Click to hide internal directories.