raft_fleet v0.7.0 RaftFleet.Manager.State View Source

Link to this section Summary

Functions

Type-aware getter for activate_worker

Type-aware setter for activate_worker

Type-aware getter for adjust_timer

Type-aware setter for adjust_timer

Type-aware getter for adjust_worker

Type-aware setter for adjust_worker

Type-aware getter for being_added_consensus_groups

Type-aware setter for being_added_consensus_groups

Type-aware getter for deactivate_worker

Type-aware setter for deactivate_worker

Creates a new instance of RaftFleet.Manager.State by using the given dict

A variant of new/1 which returns t or raise if validation fails

Updates an existing instance of RaftFleet.Manager.State 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

Link to this type consensus_group_progress() View Source
consensus_group_progress() ::
  :leader_started
  | {:leader_delegated_to, node()}
  | :process_exists
  | GenServer.from()
Link to this type t() View Source
t() :: %RaftFleet.Manager.State{
  activate_worker: Croma.TypeGen.Nilable.Croma.Pid.t(),
  adjust_timer: Croma.TypeGen.Nilable.Croma.Reference.t(),
  adjust_worker: Croma.TypeGen.Nilable.Croma.Pid.t(),
  being_added_consensus_groups: Croma.Map.t(),
  deactivate_worker: Croma.TypeGen.Nilable.Croma.Pid.t()
}

Link to this section Functions

Link to this function activate_worker(state) View Source
activate_worker(t()) :: Croma.TypeGen.Nilable.Croma.Pid.t()

Type-aware getter for activate_worker.

Link to this function activate_worker(s, field) View Source
activate_worker(t(), Croma.TypeGen.Nilable.Croma.Pid.t()) :: t()

Type-aware setter for activate_worker.

Type-aware getter for adjust_timer.

Type-aware setter for adjust_timer.

Type-aware getter for adjust_worker.

Link to this function adjust_worker(s, field) View Source
adjust_worker(t(), Croma.TypeGen.Nilable.Croma.Pid.t()) :: t()

Type-aware setter for adjust_worker.

Link to this function being_added_consensus_groups(state) View Source
being_added_consensus_groups(t()) :: Croma.Map.t()

Type-aware getter for being_added_consensus_groups.

Link to this function being_added_consensus_groups(s, field) View Source
being_added_consensus_groups(t(), Croma.Map.t()) :: t()

Type-aware setter for being_added_consensus_groups.

Link to this function deactivate_worker(state) View Source
deactivate_worker(t()) :: Croma.TypeGen.Nilable.Croma.Pid.t()

Type-aware getter for deactivate_worker.

Link to this function deactivate_worker(s, field) View Source
deactivate_worker(t(), Croma.TypeGen.Nilable.Croma.Pid.t()) :: t()

Type-aware setter for deactivate_worker.

Creates a new instance of RaftFleet.Manager.State 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.

Updates an existing instance of RaftFleet.Manager.State 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}.

Link to this function update!(s, dict) View Source
update!(t(), Dict.t()) :: t()

A variant of update/2 which returns t or raise if validation fails. In other words, update/2 followed by Croma.Result.get!/1.

Link to this function update_being_added_consensus_groups(s, name, value2) View Source
update_being_added_consensus_groups(
  RaftFleet.Manager.State.t(),
  atom(),
  consensus_group_progress()
) :: t()

Checks if the given value belongs to t/0 or not.