Packages

Elixir client for the S2 durable stream API

Current section

Files

Jump to
s2_client lib s2 schemas scalar_metric.ex
Raw

lib/s2/schemas/scalar_metric.ex

defmodule S2.ScalarMetric do
@moduledoc """
Provides struct and type for a ScalarMetric
"""
@type t :: %__MODULE__{name: String.t(), unit: String.t(), value: number}
defstruct [:name, :unit, :value]
@doc false
@spec __fields__(atom) :: keyword
def __fields__(type \\ :t)
def __fields__(:t) do
[name: :string, unit: {:enum, ["bytes", "operations"]}, value: {:number, "double"}]
end
end