Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module struct {
module.BaseModule
// contains filtered or unexported fields
}
Module implements the webhooks module.
func New ¶
func New(webhooks []WebhookConfig, m *metrics.Collector) *Module
New creates a new webhooks module with the given webhook configurations.
func (*Module) OnEventStored ¶
OnEventStored is called after any event is persisted. It finds matching webhooks and delivers the event asynchronously.
type WebhookConfig ¶
type WebhookConfig struct {
Event string `yaml:"event"` // Event type to match (e.g., "sentry", "*" for all).
URL string `yaml:"url"` // Target URL (http/https).
Headers map[string]string `yaml:"headers"` // Custom HTTP headers.
VerifySSL bool `yaml:"verify_ssl"` // Verify SSL certificates.
Retry bool `yaml:"retry"` // Retry on failure (default: true).
}
WebhookConfig defines a single webhook from the configuration.