Raxol.Core.Behaviours.BaseServer behaviour (Raxol v2.0.1)

View Source

Base behavior for general-purpose GenServers to reduce code duplication. Provides common patterns for server lifecycle, error handling, and state management.

Summary

Callbacks

Called to handle server shutdown gracefully.

Called to initialize the server state.

Callbacks

handle_shutdown(any)

(optional)
@callback handle_shutdown(any()) :: :ok

Called to handle server shutdown gracefully.

init_server(keyword)

@callback init_server(keyword()) :: {:ok, any()} | {:error, any()}

Called to initialize the server state.