Selecto.Performance.HookBehaviour behaviour
(Selecto v0.4.5)
Copy Markdown
Behaviour for implementing custom performance monitoring hooks.
Modules implementing this behaviour can be used as hook providers for the Selecto performance monitoring system.
Summary
Callbacks
Handle a hook point execution.
Initialize the hook provider.
Clean up resources when the hook provider is unregistered.
Types
Callbacks
@callback handle_hook(hook_point(), context(), state :: term()) :: context()
Handle a hook point execution.
Receives the hook point name, current context, and provider state. Should return an updated context.
Initialize the hook provider.
Called once when the hook provider is registered. Should return {:ok, state} or {:error, reason}.
Clean up resources when the hook provider is unregistered.