KomachiHeartbeat v0.4.0 KomachiHeartbeat.Vital behaviour View Source

Behaviour which vital plugins implement.

defmodule ExampleVital do
  @behaviour KomachiHeartbeat.Vital

  def stats, do: {:ok, 42}

  def vital, do: :ok
end

Application.put_env(:komachi_heartbeat, :vitals, [ExampleVital])

Link to this section Summary

Callbacks

Statistics. If it's not defined, use vital/0

Vital

Link to this section Types

Link to this section Callbacks

Link to this callback

stats() View Source
stats() :: :ok | :error | {:ok | :error, stats()}

Statistics. If it's not defined, use vital/0.

Link to this callback

vital() View Source
vital() :: :ok | :error

Vital.