webhook

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package webhook provides an explicit webhook-named HTTP correlation adapter. New composes Send and Wrap over HTTP policy without webhook signing, delivery, body access, retry or replay protection. Peer trust, resource lifetime and request/header synchronization remain application-owned.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter keeps webhook propagation explicit at send and receive call sites. Construct with New; nil Adapter receivers panic on Send/Wrap. Sharing inherits HTTP Factory/Trust callback safety and does not synchronize header maps.

func New

func New(factory *correlation.Factory, options Options) (*Adapter, error)

New constructs an explicit webhook correlation adapter.

func (*Adapter) Send

func (adapter *Adapter) Send(request *http.Request, parent correlation.Values) (correlation.Values, error)

Send creates and injects an outbound webhook request hop without sending it. It delegates HTTP Inject's header ownership, overwrite and failure semantics; it does not create signatures or authenticate a receiver.

func (*Adapter) Wrap

func (adapter *Adapter) Wrap(next http.Handler) http.Handler

Wrap receives a webhook through the configured HTTP trust/invalid-input policy. It delegates HTTP Wrap's canonical header writes and derived context, not webhook authentication or body processing; callbacks/handlers are borrowed.

type Options

type Options = httpcorrelation.Options

Options configure webhook boundary trust and invalid input handling.

Jump to

Keyboard shortcuts

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