Documentation
¶
Overview ¶
Package deliver is the outbound worker: it claims due deliveries from the store and POSTs the original event body to the configured targets with exponential backoff, jitter and a dead-letter terminal state.
Delivery is at-least-once. Consumers should dedupe on the X-Hookkeep-Event-Id header if they cannot tolerate duplicates.
Index ¶
Constants ¶
View Source
const Visibility = 2 * time.Minute
Visibility is the in-flight lease: a delivery claimed longer than this is considered abandoned (worker crashed) and becomes claimable again. It must comfortably exceed the longest target timeout.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Worker ¶
type Worker struct {
Store *store.Store
Cfg *config.Config
Log *slog.Logger
Client *http.Client // shared; per-request timeout comes from target config
Jitter func() float64
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.