View Source NervesHubLink.Extensions.Health.DeviceStatus (nerves_hub_link v2.6.0)

Structure for device status.

Summary

Types

alarm_description()

@type alarm_description() :: String.t()

alarm_id()

@type alarm_id() :: String.t()

connection_status()

@type connection_status() :: :lan | :internet | :disconnected

interface_identifer()

@type interface_identifer() :: String.t()

interface_type()

@type interface_type() :: :ethernet | :wifi | :mobile | :local | :unknown

t()

@type t() :: %NervesHubLink.Extensions.Health.DeviceStatus{
  alarms: %{required(alarm_id()) => alarm_description()},
  checks: %{required(String.t()) => %{pass: boolean(), note: String.t()}},
  connectivity: %{
    required(interface_identifer()) => %{
      type: interface_type(),
      present: boolean(),
      state: atom(),
      connection_status: connection_status(),
      metrics: %{required(String.t()) => number()},
      metadata: %{required(String.t()) => String.t()}
    }
  },
  metadata: %{required(String.t()) => String.t()},
  metrics: %{required(String.t()) => number()},
  timestamp: DateTime.t()
}

Functions

new(kv)