Help us shape the future of Go! Take the 2026 Go Developer Survey

webhook

package module
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: MIT Imports: 16 Imported by: 0

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

func New(r *relay.Relay) *Driver

New creates a new webhook driver. If r is non-nil, events are published through Relay instead of direct HTTP POST.

func (*Driver) Channel

func (d *Driver) Channel() string

func (*Driver) Fields

func (d *Driver) Fields() []driver.Field

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) Name

func (d *Driver) Name() string

func (*Driver) Send

func (*Driver) Validate

func (d *Driver) Validate(credentials, _ map[string]string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL