Caddy.Supervisor (Caddy v2.3.1)
View SourceMain supervisor for the Caddy subsystem.
Manages the Caddy configuration, logging, and server processes using a rest_for_one strategy to ensure proper restart ordering.
Supervision Tree
Caddy.ConfigProvider- Agent for configuration managementCaddy.ConfigManager- GenServer coordinating in-memory and runtime configCaddy.Logger- Logging subsystem with buffer and storageCaddy.Server- GenServer managing the Caddy binary process
The rest_for_one strategy ensures that if the ConfigProvider crashes, all subsequent children are restarted. If the ConfigManager crashes, Logger and Server are restarted.
Summary
Functions
Returns a specification to start this module under a supervisor.
Restart the Caddy Server child process.
Start the Caddy supervisor.
Stop the Caddy supervisor.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Restart the Caddy Server child process.
Returns {:ok, pid()} on successful restart, or {:error, term()} on failure.
Start the Caddy supervisor.
Options
:caddy_bin- Path to the Caddy binary (optional)
@spec stop(term()) :: :ok
Stop the Caddy supervisor.