Ingot.HealthCheck (Ingot v0.1.0)
View SourceHealth check module for Ingot.
Checks the health of:
- The Phoenix endpoint (is the server running?)
- Forge service (can we reach it?)
- Anvil service (can we reach it?)
Used by the /health endpoint for monitoring and alerting.
Summary
Functions
Check if Anvil service is reachable.
Check if the Phoenix endpoint is running.
Check if Forge service is reachable.
Get detailed health status with per-service breakdowns.
Get overall health status.
Types
Functions
@spec check_anvil() :: :ok | :error
Check if Anvil service is reachable.
Returns :ok if Anvil responds to health check, :error otherwise.
@spec check_endpoint() :: :ok | :error
Check if the Phoenix endpoint is running.
Returns :ok if the endpoint is running, :error otherwise.
@spec check_forge() :: :ok | :error
Check if Forge service is reachable.
Returns :ok if Forge responds to health check, :error otherwise.
@spec detailed_status() :: map()
Get detailed health status with per-service breakdowns.
Returns a map with overall status, individual service statuses, and timestamp.
@spec status() :: health_status()
Get overall health status.
Returns :healthy if all services are reachable, :unhealthy otherwise.