Base behavior for manager GenServers to reduce code duplication. Provides common patterns for state management, lifecycle, and error handling.
Summary
Callbacks
Called to handle manager-specific requests.
Called to handle manager-specific casts.
Called to handle manager-specific info messages.
Called to initialize the manager state.
Returns {:ok, state}, or {:stop, reason} to refuse to start: the
process exits with reason and start_link returns {:error, reason}.
For a failure that is a bug, raise.
Callbacks
@callback handle_manager_call(any(), GenServer.from(), any()) :: {:reply, any(), any()} | {:noreply, any()} | {:stop, any(), any(), any()}
Called to handle manager-specific requests.
Called to handle manager-specific casts.
Called to handle manager-specific info messages.
Called to initialize the manager state.
Returns {:ok, state}, or {:stop, reason} to refuse to start: the
process exits with reason and start_link returns {:error, reason}.
For a failure that is a bug, raise.