Versions in this module Expand all Collapse all v0 v0.1.3 Nov 25, 2026 Changes in this version + const DefaultTolerance + const DeliveriesFile + const DisableAfter + const HeaderID + const HeaderSignature + const HeaderTimestamp + const MaxPayload + const QueueSize + const RotationGrace + const SecretPrefix + const SecretsFile + const StateFile + const Timeout + var DefaultBackoff = []time.Duration + var ErrDenied = errors.New("webhook: address not allowed") + var ErrNoSignature = errors.New("webhook: missing id, timestamp or signature header") + var ErrSignature = errors.New("webhook: no signature matches") + var ErrTimestamp = errors.New("webhook: timestamp outside the tolerance") + var ErrTooLarge = errors.New("webhook: payload over 256 KiB, not sent") + func DefaultSecretsPath(stateDir string) string + func Denied(addr netip.Addr) bool + func Disabled(stateDir, name string) bool + func NewSecret() string + func Sign(secret, id string, ts time.Time, body []byte) string + func SignatureHeader(secrets []string, id string, ts time.Time, body []byte) string + func Verify(secret string, h http.Header, body []byte, now time.Time, ...) error + type Dispatcher struct + Backoff []time.Duration + Bus *events.Bus + Endpoints []settings.Webhook + Log *jsonlog.Log + Now func() time.Time + Sender *Sender + StatePath string + func NewDispatcher(stateDir string, endpoints []settings.Webhook, sender *Sender, bus *events.Bus) *Dispatcher + func (d *Dispatcher) Run(ctx context.Context, sub *events.Subscription) + func (d *Dispatcher) States() map[string]endpointState + func (d *Dispatcher) Test(ctx context.Context, w settings.Webhook) (events.Event, Result) + type Policy struct + AllowInsecureLocalhost bool + AllowPrivate bool + func (p Policy) CheckURL(raw string) (loopbackOK bool, err error) + func (p Policy) DialContext(loopbackOK bool, timeout time.Duration) func(ctx context.Context, network, addr string) (net.Conn, error) + func (p Policy) Dialer(loopbackOK bool, timeout time.Duration) *net.Dialer + type Record struct + Attempt int + DurationMs int64 + Endpoint string + Error string + EventID string + NextTry time.Time + Outcome string + Status int + Time time.Time + Type string + type Result struct + Duration time.Duration + Err error + Permanent bool + Status int + type Secrets struct + Lookup func(string) (string, bool) + Now func() time.Time + Path string + func (s *Secrets) Create(name string) (string, error) + func (s *Secrets) Has(name string) bool + func (s *Secrets) Remove(name string) error + func (s *Secrets) Rotate(name string) (string, error) + func (s *Secrets) Signing(w settings.Webhook) ([]string, error) + type Sender struct + Now func() time.Time + Policy Policy + Secrets *Secrets + func (s *Sender) Send(ctx context.Context, w settings.Webhook, e events.Event) Result v0.1.3-rc.1 Nov 25, 2026