Small, authority-free utilities shared by ExGAM adapter boundaries.
Adapters connect the governed runtime to application code: clocks, ingress, minds, stores, executors, brokers and observers. Discovering a module or calling one of its callbacks never grants authority; it only validates host wiring or crosses an already-declared boundary.
This module intentionally knows nothing about a particular behaviour. Each boundary remains responsible for validating callback results and translating failures into its own domain vocabulary.
Summary
Functions
Invokes a previously validated callback without leaking exception details.
Validates that a loaded module implements every required callback.
Types
@type callback_spec() :: {atom(), non_neg_integer()}
@type validation_error() :: {:invalid_adapter_module, term()} | {:adapter_module_not_loaded, module()} | {:adapter_callback_missing, module(), atom(), non_neg_integer()}
Functions
@spec invoke(module(), atom(), [term()]) :: {:ok, term()} | {:error, invocation_error()}
Invokes a previously validated callback without leaking exception details.
@spec validate(term(), [callback_spec()]) :: :ok | {:error, validation_error()}
Validates that a loaded module implements every required callback.