Expand description
Delivering an alert to one channel, and checking a channel’s target when it is saved.
HTTP channels (Slack, Discord, webhook) are user-supplied URLs, so every request goes through
the crawler’s address guard: check_url on the URL, a client whose resolver drops private
and internal addresses, no redirects (a public URL that 302s to localhost is an error, never
followed), no proxy, and a 10 second timeout.
Structs§
- Guarded
Http - The HTTP side of delivery: a client plus the address policy it was built for, so the two can’t drift apart. Build it once per process and keep it (the job context, the web settings page).
Enums§
- Channel
Kind - Channel
Target - Where a channel delivers to. Slack and Discord URLs carry a token, and a webhook has a secret,
so
Debugshows hosts only. - Delivery
Error - Target
Error
Functions§
- deliver
- Delivers
msgto one channel. HTTP channels check the URL with the address guard first, then post throughhttp’s guarded client.