Documentation
¶
Overview ¶
Package webhook provides a Herald driver for webhook delivery.
The webhook driver sends notification payloads via HTTP POST to a configured URL. It optionally integrates with Relay for built-in retries, signing, and dead-letter queue support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver delivers notifications via HTTP webhooks. If a Relay instance is provided, events are published through Relay (which provides retries, signatures, and DLQ). Otherwise, a direct HTTP POST is performed with optional HMAC-SHA256 signing.
func New ¶
New creates a new webhook driver. If r is non-nil, events are published through Relay instead of direct HTTP POST.
func (*Driver) Fields ¶
Fields describes what the webhook driver reads. Settings whose key starts with "data." are forwarded in the payload's data object, with the prefix removed.
func (*Driver) Send ¶
func (d *Driver) Send(ctx context.Context, msg *driver.OutboundMessage) (*driver.DeliveryResult, error)