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

ecosystem

package
v1.9.3 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package ecosystem maps Dispatch envelopes to reliable ecosystem acceptance APIs.

Index

Constants

View Source
const MappingVersion = 1
View Source
const MaxResponseBytes = 256 << 10
View Source
const RelayEventType = "dispatch.delivery.v1"

Variables

View Source
var ErrTransport = errors.New("dispatch: sink transport unavailable or invalid response")

Functions

func ChronicleRequest

func ChronicleRequest(b Binding, d durable.Delivery) (ca.Request, error)

func RegisterRelaySchema

func RegisterRelaySchema(ctx context.Context, c *catalog.Catalog, appID string) error

RegisterRelaySchema installs the actual schema in the sink catalog. Hosts call this before admitting requests, using their trusted app identity.

func RelayRequest

func RelayRequest(b Binding, d durable.Delivery) (ra.Request, error)

Types

type Binding

type Binding struct {
	Producer       string
	InstallationID string
	Namespace      string
	AppID          string
	OrgID          string
	TenantID       string
}

Binding comes from the host installation registry, never delivery content. Each adapter serves one immutable namespace ownership record.

func (Binding) Validate

func (b Binding) Validate() error

type Chronicle

type Chronicle struct {
	Binding Binding
	Client  ChronicleClient
}

func (Chronicle) Accept

type ChronicleClient

type ChronicleClient interface {
	RecordOnce(context.Context, ca.Request) (*ca.Receipt, error)
}

type ConflictResponse

type ConflictResponse struct {
	Destination       string `json:"destination"`
	SourceKey         string `json:"source_key"`
	SourceFingerprint string `json:"source_fingerprint"`
	Fingerprint       string `json:"fingerprint"`
}

ConflictResponse is emitted only after the reliable API confirms a conflict. Its binding prevents an unrelated proxy error from permanently blocking work.

type Relay

type Relay struct {
	Binding Binding
	Client  RelayClient
}

func (Relay) Accept

type RelayClient

type RelayClient interface {
	SendReliable(context.Context, ra.Request) (*ra.Receipt, error)
}

type Remote

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

Remote owns a fixed destination and never accepts URLs from delivery content. Credentials are private and error messages contain no request or response data.

func NewRemote

func NewRemote(endpoint, bearer string, timeout time.Duration, localLoopbackHTTP bool) (*Remote, error)

func (*Remote) Close

func (r *Remote) Close()

Close drops idle connections. It goes to the *http.Transport directly: the traced wrapper around it has no CloseIdleConnections, so http.Client.CloseIdleConnections would not reach it.

func (*Remote) RecordOnce

func (r *Remote) RecordOnce(ctx context.Context, request ca.Request) (*ca.Receipt, error)

func (*Remote) SendReliable

func (r *Remote) SendReliable(ctx context.Context, request ra.Request) (*ra.Receipt, error)

Jump to

Keyboard shortcuts

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