executorhttp

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package executorhttp adapts an Effectus HTTP verb target to a Go handler.

Index

Constants

View Source
const (
	DirectionForward      = invocation.DirectionForward
	DirectionCompensation = invocation.DirectionCompensation
)

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(options Options, handler HandlerFunc) (http.Handler, error)

NewHandler creates a strict Effectus business executor endpoint.

func Permanent

func Permanent(err error) invocation.Outcome

Permanent reports a permanent business failure.

func Retryable

func Retryable(err error) invocation.Outcome

Retryable reports a failure that is known not to have committed.

func StaleFence

func StaleFence(err error) invocation.Outcome

StaleFence reports a rejected stale fencing token.

func Success

func Success(result any) invocation.Outcome

Success reports a committed business operation.

func Unknown

func Unknown(err error) invocation.Outcome

Unknown reports a failure whose commit state is not known.

Types

type Direction

type Direction = invocation.Direction

Direction identifies forward and compensation calls.

type HandlerFunc

type HandlerFunc func(context.Context, Request) Outcome

HandlerFunc performs one idempotent business operation.

type Options

type Options struct {
	MaxRequestBytes int64
}

Options controls the HTTP boundary.

type Outcome

type Outcome = invocation.Outcome

Outcome is the explicit result returned by a business executor.

type Request

type Request struct {
	Arguments    map[string]any
	Metadata     invocation.Context
	ArgumentHash string
	ContractHash string
}

Request contains business arguments and immutable Effectus metadata.

Jump to

Keyboard shortcuts

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