Documentation
¶
Overview ¶
Package worker drains the pending-delivery queue: it claims due deliveries, performs them through the delivery engine, records each attempt, and either reschedules with backoff or dead-letters on exhaustion.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Concurrency int
PollInterval time.Duration
Lease time.Duration
Backoff core.BackoffConfig
Metrics Recorder
// DrainTimeout bounds how long Run waits for in-flight deliveries to finish
// after the context is cancelled before force-cancelling them.
DrainTimeout time.Duration
}
Options configures the worker pool.
type Recorder ¶
type Recorder interface {
RecordDelivery(outcome string)
RecordDeadLetter()
}
Recorder receives delivery telemetry. *metrics.Metrics satisfies it.
Click to show internal directories.
Click to hide internal directories.