View Source Fishjam.Health (Fishjam Server SDK v0.6.0)
Utilities for managing the health of Fishjam instances.
Examples
iex> client = Fishjam.Client.new()
iex> assert {:ok, %Fishjam.Health{
...> status: :up,
...> }} = Fishjam.Health.check(client)
Summary
Functions
Perform a health check of Fishjam.
Types
@type status() :: :up | :down
The status of Fishjam or a specific service.
@type t() :: %Fishjam.Health{ distribution: %{ enabled: boolean(), node_status: status(), nodes_in_cluster: non_neg_integer() }, status: status(), uptime: non_neg_integer() }
Stores a health report of Fishjam.
:status
- overall status:uptime
- uptime in seconds:distribution
- distribution health report::enabled
- whether distribution is enabled:node_status
- status of this Fishjam's node:nodes_in_cluster
- amount of nodes (including this Fishjam's node) in the distribution cluster
Functions
@spec check(Fishjam.Client.t()) :: {:ok, t()} | {:error, atom() | String.t()}
Perform a health check of Fishjam.