raft_kv v0.2.3 RaftKV.Keyspaces View Source
Link to this section Summary
Functions
Type-aware getter for keyspaces
Type-aware setter for keyspaces
Type-aware getter for merge_candidates
Type-aware setter for merge_candidates
Creates a new instance of RaftKV.Keyspaces by using the given dict
A variant of new/1
which returns t
or raise if validation fails
Type-aware getter for ongoing_workflow
Type-aware setter for ongoing_workflow
Type-aware getter for pending_deregistrations_queue
Type-aware setter for pending_deregistrations_queue
Type-aware getter for split_candidates
Type-aware setter for split_candidates
Updates an existing instance of RaftKV.Keyspaces 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() :: %RaftKV.Keyspaces{ keyspaces: RaftKV.Keyspaces.KeyspaceMap.t(), merge_candidates: RaftKV.Keyspaces.MergeCandidates.t(), ongoing_workflow: Croma.TypeGen.Nilable.RaftKV.Keyspaces.OngoingWorkflow.t(), pending_deregistrations_queue: Croma.Tuple.t(), split_candidates: RaftKV.Keyspaces.SplitCandidates.t() }
Link to this section Functions
add_consensus_group() :: :ok | {:error, :already_added}
keyspaces(t()) :: RaftKV.Keyspaces.KeyspaceMap.t()
Type-aware getter for keyspaces.
keyspaces(t(), RaftKV.Keyspaces.KeyspaceMap.t()) :: t()
Type-aware setter for keyspaces.
merge_candidates(t()) :: RaftKV.Keyspaces.MergeCandidates.t()
Type-aware getter for merge_candidates.
merge_candidates(t(), RaftKV.Keyspaces.MergeCandidates.t()) :: t()
Type-aware setter for merge_candidates.
Creates a new instance of RaftKV.Keyspaces 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
.
ongoing_workflow(t()) :: Croma.TypeGen.Nilable.RaftKV.Keyspaces.OngoingWorkflow.t()
Type-aware getter for ongoing_workflow.
Type-aware setter for ongoing_workflow.
pending_deregistrations_queue(t()) :: Croma.Tuple.t()
Type-aware getter for pending_deregistrations_queue.
pending_deregistrations_queue(t(), Croma.Tuple.t()) :: t()
Type-aware setter for pending_deregistrations_queue.
register(atom(), RaftKV.SplitMergePolicy.t()) :: :ok | {:error, :already_added}
split_candidates(t()) :: RaftKV.Keyspaces.SplitCandidates.t()
Type-aware getter for split_candidates.
split_candidates(t(), RaftKV.Keyspaces.SplitCandidates.t()) :: t()
Type-aware setter for split_candidates.
submit_stats(%{ optional(atom()) => %{ optional(RaftKV.Hash.t()) => {non_neg_integer(), non_neg_integer(), non_neg_integer(), non_neg_integer()} } }) :: :ok
Updates an existing instance of RaftKV.Keyspaces 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.
workflow_fetch_from_local_leader() :: nil | RaftKV.Workflow.t()
workflow_proceed(RaftKV.Workflow.t()) :: nil | RaftKV.Workflow.t()