dist_agent v0.1.1 DistAgent.Quota View Source
Link to this section Summary
Functions
Type-aware getter for limits_map
Type-aware setter for limits_map
Creates a new instance of DistAgent.Quota by using the given dict
A variant of new/1
which returns t
or raise if validation fails
Type-aware getter for nodes_map
Type-aware setter for nodes_map
Updates an existing instance of DistAgent.Quota with the given dict
.
The values in the dict
are validated by each field’s valid?/1
function.
Returns {:ok, valid_struct}
or {:error, reason}
A variant of update/2
which returns t
or raise if validation fails.
In other words, update/2
followed by Croma.Result.get!/1
Checks if the given value belongs to t/0
or not
Link to this section Types
t() :: %DistAgent.Quota{ limits_map: DistAgent.Quota.LimitsMap.t(), nodes_map: DistAgent.Quota.NodesMap.t() }
Link to this section Functions
add_consensus_group() :: :ok | {:error, :already_added}
limits_map(t()) :: DistAgent.Quota.LimitsMap.t()
Type-aware getter for limits_map.
limits_map(t(), DistAgent.Quota.LimitsMap.t()) :: t()
Type-aware setter for limits_map.
Creates a new instance of DistAgent.Quota by using the given dict
.
For missing fields, default/0
of each field type will be used.
Returns {:ok, valid_struct}
or {:error, reason}
.
The values in the dict
are validated by each field’s valid?/1
function.
A variant of new/1
which returns t
or raise if validation fails.
In other words, new/1
followed by Croma.Result.get!/1
.
Type-aware getter for nodes_map.
nodes_map(t(), DistAgent.Quota.NodesMap.t()) :: t()
Type-aware setter for nodes_map.
query_status(DistAgent.Id.t()) :: :ok | :not_found | :limit_reached
report_local_counts(DistAgent.Quota.CountsMap.t()) :: [DistAgent.Quota.Name.t()]
Updates an existing instance of DistAgent.Quota with the given dict
.
The values in the dict
are validated by each field’s valid?/1
function.
Returns {:ok, valid_struct}
or {:error, reason}
.
A variant of update/2
which returns t
or raise if validation fails.
In other words, update/2
followed by Croma.Result.get!/1
.
Checks if the given value belongs to t/0
or not.