# `Selecto.Performance.HookBehaviour`

Behaviour for implementing custom performance monitoring hooks.

Modules implementing this behaviour can be used as hook providers
for the Selecto performance monitoring system.

# `context`

```elixir
@type context() :: map()
```

# `hook_fn`

```elixir
@type hook_fn() :: (context() -&gt; context())
```

# `hook_point`

```elixir
@type hook_point() :: atom()
```

# `handle_hook`

```elixir
@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.

# `init`

```elixir
@callback init(opts :: keyword()) :: {:ok, term()} | {:error, term()}
```

Initialize the hook provider.

Called once when the hook provider is registered.
Should return {:ok, state} or {:error, reason}.

# `terminate`
*optional* 

```elixir
@callback terminate(reason :: term(), state :: term()) :: :ok
```

Clean up resources when the hook provider is unregistered.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
