Expand description
Generic, template-driven webhook output sink (roadmap item #54).
One configurable HTTP sink, not a handful of bespoke service integrations: Slack, Teams, Discord, and PagerDuty ship as field-parametric YAML recipes in the docs, while the engine stays service-agnostic. Each webhook renders a templated URL, headers, and body per detection / correlation result and posts it over the shared egress-filtered HTTP client.
The webhook is a leaf on the shared async delivery layer
(crate::io::delivery): the dispatcher owns the bounded queue, the
retry/backoff schedule, terminal-failure-to-DLQ routing, and drain on
shutdown. WebhookSink owns only the webhook-specific request behavior
(template render, retryable-vs-permanent classification, per-entry token
bucket). Webhooks run in the lossy on_full=drop mode so a third-party
chat or paging endpoint never blocks the at-least-once token release for
durable sinks (NATS, file); anything undeliverable lands in the DLQ.
Structs§
- Built
Webhook - A webhook sink plus the per-sink delivery config the dispatcher drives it
with. The full-queue policy is fixed to
Dropby the caller (the lossy seam that keeps a third-party HTTP endpoint off the at-least-once path). - Custom
Signing Config signing.custom:block. Honored only whenscheme: custom.- Rate
Limit Config rate_limit:block.requestsperper, burst =requests.- Retry
Config retry:block. Each field overrides a delivery-layer default.- Scope
Config scope:block. Mirrors the enrichment scope axes.- Signing
Config signing:block. HMAC-signs each request so a receiver can verify it.- Webhook
Config - One webhook’s YAML config block.
- Webhook
Sink - One configured webhook. Filters each result by kind and scope, then renders and posts a templated request, classifying the outcome for the delivery layer.
- Webhooks
File - Top-level webhooks config file.
Enums§
- Webhook
Config Error - Errors produced while loading or validating a webhooks config.
- Webhook
Kind - Parsed
kind:discriminator.
Constants§
- DEFAULT_
WEBHOOK_ ATTEMPTS - Default total attempts (one initial try plus retries).
- DEFAULT_
WEBHOOK_ BACKOFF - Default exponential backoff base.
- DEFAULT_
WEBHOOK_ MAX_ BACKOFF - Default backoff ceiling.
- DEFAULT_
WEBHOOK_ QUEUE_ SIZE - Default bounded queue depth between the dispatcher and the worker.
- DEFAULT_
WEBHOOK_ TIMEOUT - Default per-request timeout when
timeout:is omitted.
Functions§
- build_
webhooks - Validate and build every webhook in
fileinto aBuiltWebhook. - load_
webhooks_ file - Read and deserialize a webhooks config file (no validation; see
build_webhooks).