Syntropy.Webhooks.Dispatcher
(syntropy v0.3.0)
Copy Markdown
Delivers runtime events to registered webhook endpoints.
Subscribes to the lattice:events PubSub topic. For every event, each
matching active endpoint gets an HMAC-signed POST (see
Syntropy.Webhooks.Signature) executed under the bounded
Syntropy.WebhookTaskSupervisor with bounded retries and backoff. When
the supervisor is saturated (max_children reached) the delivery is
recorded as failed rather than crashing or queueing without bound.
Destination URLs are re-checked against Syntropy.Webhooks.UrlPolicy
right before each delivery, so a DNS record that starts resolving to a
private address after registration is still blocked.
The HTTP transport can be overridden through the
:syntropy, :webhook_http_post application env (a 3-arity function of
url, body, headers), which the test suite uses to capture deliveries
without opening sockets.
Summary
Functions
Returns a specification to start this module under a supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: GenServer.on_start()