Documentation
¶
Overview ¶
Package webhook provides a webhook publisher for the outbox pattern. It sends HTTP POST requests to configured endpoints for each outbox message.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*Publisher)
Option configures a webhook Publisher.
func WithDefaultHeaders ¶
WithDefaultHeaders sets default headers added to all requests.
func WithHTTPClient ¶
WithHTTPClient sets a custom HTTP client.
func WithTimeout ¶
WithTimeout sets the HTTP request timeout.
type Publisher ¶
type Publisher struct {
// contains filtered or unexported fields
}
Publisher publishes outbox messages as HTTP POST requests. Destination format: "webhook:https://example.com/events"
func (*Publisher) Destination ¶
Destination returns the destination prefix this publisher handles.
Click to show internal directories.
Click to hide internal directories.