raft_fleet v0.6.1 RaftFleet.Cluster View Source
Link to this section Summary
Functions
Generic read/write operation on the stored value
Creates an initial value to be stored
Read-only operation on the stored value
Link to this section Functions
command(t(), RaftedValue.Data.command_arg()) :: {RaftedValue.Data.command_ret(), t()}
Generic read/write operation on the stored value.
This callback function is invoked by RaftedValue.command/4
.
Commands are replicated across members of the consensus group and executed in all members
in order to reproduce the same history of stored value.
This function should return a pair of “return value to client” and “next version of stored data”.
Callback implementation for RaftedValue.Data.command/2
.
Creates an initial value to be stored.
Whenever a new consensus group is started by RaftedValue.start_link/2
(called with :create_new_consensus_group
),
this function is called to initialize the stored value.
Callback implementation for RaftedValue.Data.new/0
.
query(t(), RaftedValue.Data.query_arg()) :: RaftedValue.Data.query_ret()
Read-only operation on the stored value.
This callback function is invoked by RaftedValue.query/3
.
This function should return “return value to client”.
Callback implementation for RaftedValue.Data.query/2
.