Documentation ¶ Index ¶ type Config type Worker func NewWorker(dataStore attemptStore, box *secret.Box, serviceClock clock.Clock, ...) (*Worker, error) func (w *Worker) Run(ctx context.Context) error func (w *Worker) RunOnce(ctx context.Context) (int, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Config ¶ type Config struct { Destinations *destination.Policy Tracer trace.Tracer Jitter func() float64 WorkerID string Lease time.Duration BatchSize int PollPeriod time.Duration RequestTimeout time.Duration } type Worker ¶ type Worker struct { // contains filtered or unexported fields } func NewWorker ¶ func NewWorker(dataStore attemptStore, box *secret.Box, serviceClock clock.Clock, logger *slog.Logger, config Config) (*Worker, error) func (*Worker) Run ¶ func (w *Worker) Run(ctx context.Context) error func (*Worker) RunOnce ¶ func (w *Worker) RunOnce(ctx context.Context) (int, error) RunOnce starts every attempt in a claimed batch immediately. The lease only needs to bound one outbound timeout, not the sum of a sequential batch. Source Files ¶ View all Source files worker.go Click to show internal directories. Click to hide internal directories.