Documentation
¶
Overview ¶
Package webhook delivers Console events to an arbitrary HTTP endpoint as a JSON POST. It is the generic sink: any service that can accept a JSON webhook (a custom handler, an automation platform, a serverless function) can consume Console events without a bespoke integration.
When a Secret is configured it is sent verbatim in the X-Webhook-Secret request header, letting the receiver authenticate the caller with a simple shared-secret check.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifier ¶
type Notifier struct {
// URL is the endpoint the event is POSTed to.
URL string
// Secret, when set, is sent in the X-Webhook-Secret header so the receiver
// can authenticate the caller.
Secret string
// HTTP issues the POST. If nil, a client with a sane timeout is used.
HTTP *http.Client
}
Notifier posts events to a configured HTTP endpoint as JSON.
Click to show internal directories.
Click to hide internal directories.