webhookoutbox

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package webhookoutbox adapts webhook deliveries to outbox envelopes and relay publishers.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidConfig = errors.New("webhook/outbox: invalid configuration")

Functions

func Build

func Build(
	builder *outbox.EnvelopeBuilder,
	topic string,
	delivery webhook.DeliveryRequest,
	maxMessageBytes int,
) (outbox.Envelope, error)

Build encodes a bounded delivery request into a validated outbox envelope.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher implements relay.Publisher with exactly one HTTP attempt per claimed envelope. The relay remains the sole retry and dead-letter owner.

func NewPublisher

func NewPublisher(deliverer *webhook.Deliverer, maxMessageBytes int) (*Publisher, error)

NewPublisher validates the deliverer and payload bound.

func (*Publisher) Publish

func (p *Publisher) Publish(ctx context.Context, envelope outbox.Envelope) error

Publish decodes one strict envelope payload and performs one HTTP attempt.

Jump to

Keyboard shortcuts

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