raft_fleet v0.5.0 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

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.

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.