Raxol.Protocols.CoreProtocols.Lifecycle protocol (Raxol v2.0.1)
View SourceProtocol for managing component/module lifecycle. Handles initialization, startup, shutdown, and cleanup.
Summary
Functions
Cleans up resources used by the component/module.
Gets the current lifecycle state.
Initializes the component/module with given options.
Restarts the component/module.
Starts the component/module.
Stops the component/module.
Types
@type t() :: term()
All the types that implement this protocol.
Functions
@spec cleanup(t()) :: :ok
Cleans up resources used by the component/module.
@spec get_state(t()) :: :initialized | :starting | :running | :stopping | :stopped | :error
Gets the current lifecycle state.
Initializes the component/module with given options.
Restarts the component/module.
Starts the component/module.
Stops the component/module.