Spectre.Server.GAM.EffectAdapter behaviour (Spectre v0.4.0)

Copy Markdown View Source

Explicit execution contract for an already admitted, frozen effect.

The runtime selects an adapter from immutable Stack registrations. Payloads cannot choose a module or function. An Act reference is correlation, not a promise that an external service implements idempotency. Adapters must report ambiguous outcomes honestly and must not retry an uncertain effect.

Summary

Types

result()

@type result() :: {:ok, term()} | {:error, status(), term()}

status()

@type status() :: :failed | :definitive_no_effect | :ambiguous

Callbacks

effect_schema(arg1, map)

(optional)
@callback effect_schema(atom() | binary(), map()) :: {:ok, binary()} | {:error, term()}

execute_effect(arg1, map, map)

@callback execute_effect(atom() | binary(), map(), map()) :: result()