rafted_value v0.2.0 RaftedValue.Leadership
Summary
Functions
Type-aware getter for follower_responded_times
Type-aware setter for follower_responded_times
Type-aware getter for heartbeat_timer
Type-aware setter for heartbeat_timer
Creates a new instance of Elixir.RaftedValue.Leadership by using the given dict and the default value of each field.
Returns {:ok, valid_struct} or {:error, reason}.
The values in the dict are validated by each field’s validate/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 quorum_timer
Type-aware setter for quorum_timer
Type-aware getter for quorum_timer_started_at
Type-aware setter for quorum_timer_started_at
Updates an existing instance of Elixir.RaftedValue.Leadership with the given dict.
The values in the dict are validated by each field’s validate/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 that the given dict is valid or not by using each field’s validate/1 function.
Returns {:ok, valid_struct} or {:error, reason}
A variant of validate/1 which returns t or raise if validation fails.
In other words, validate/1 followed by Croma.Result.get!/1
Types
t() :: %RaftedValue.Leadership{follower_responded_times: Croma.Map.t, heartbeat_timer: Croma.Reference.t, quorum_timer: Croma.Reference.t, quorum_timer_started_at: RaftedValue.Monotonic.t}
Functions
can_safely_remove?(RaftedValue.Leadership.t, RaftedValue.Members.t, pid, RaftedValue.Config.t) :: boolean
follower_responded(RaftedValue.Leadership.t, RaftedValue.Members.t, pid, RaftedValue.Monotonic.t, RaftedValue.Config.t) :: t
Type-aware getter for follower_responded_times.
Type-aware setter for follower_responded_times.
Type-aware getter for heartbeat_timer.
Type-aware setter for heartbeat_timer.
lease_expired?(t, RaftedValue.Members.t, RaftedValue.Config.t) :: boolean
Creates a new instance of Elixir.RaftedValue.Leadership by using the given dict and the default value of each field.
Returns {:ok, valid_struct} or {:error, reason}.
The values in the dict are validated by each field’s validate/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 quorum_timer.
Type-aware setter for quorum_timer.
Type-aware getter for quorum_timer_started_at.
Type-aware setter for quorum_timer_started_at.
remove_follower_response_time_entry(RaftedValue.Leadership.t, pid) :: t
reset_heartbeat_timer(RaftedValue.Leadership.t, RaftedValue.Config.t) :: t
reset_quorum_timer(RaftedValue.Leadership.t, RaftedValue.Config.t) :: t
unresponsive_followers(RaftedValue.Leadership.t, RaftedValue.Members.t, RaftedValue.Config.t) :: [pid]
Updates an existing instance of Elixir.RaftedValue.Leadership with the given dict.
The values in the dict are validated by each field’s validate/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 that the given dict is valid or not by using each field’s validate/1 function.
Returns {:ok, valid_struct} or {:error, reason}.
A variant of validate/1 which returns t or raise if validation fails.
In other words, validate/1 followed by Croma.Result.get!/1.