contract

package
v3.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bus

type Bus interface {
	Dispatch(runtimeInstance runtimecontract.Runtime, message any, stamps ...Stamp) (Envelope, error)
}

type Envelope

type Envelope interface {
	Message() any

	Stamps() []Stamp

	WithStamp(stamps ...Stamp) Envelope
}

type HandlerLocator

type HandlerLocator interface {
	HandlersFor(message any) []MessageHandler
}

type MessageHandler

type MessageHandler interface {
	Handle(runtimeInstance runtimecontract.Runtime, message any) error
}

type Middleware

type Middleware func(runtimeInstance runtimecontract.Runtime, envelope Envelope, next StackNext) (Envelope, error)

type StackNext

type StackNext func(runtimeInstance runtimecontract.Runtime, envelope Envelope) (Envelope, error)

type Stamp

type Stamp interface {
	StampName() string
}

type Transport

type Transport interface {
	Send(runtimeInstance runtimecontract.Runtime, envelope Envelope) error

	Receive(runtimeInstance runtimecontract.Runtime) (<-chan Envelope, error)

	Ack(runtimeInstance runtimecontract.Runtime, envelope Envelope) error

	Nack(runtimeInstance runtimecontract.Runtime, envelope Envelope, requeue bool) error

	Close(runtimeInstance runtimecontract.Runtime) error
}

Jump to

Keyboard shortcuts

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