farmbot_os/farmbot_telemetry/lib/farmbot_telemetry/class.ex

15 lines
338 B
Elixir

defprotocol FarmbotTelemetry.Class do
@moduledoc """
Classificaiton of a telemetry event
"""
@typedoc "Type of event in relation to the class"
@type type() :: atom()
@typedoc "Action in relation to the type"
@type action() :: atom()
@doc "mapping of `type` to `action`"
@callback matrix() :: [{type(), action()}]
end