delivery

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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