Documentation ¶
Index ¶
Constants ¶
View Source
const ( SNAPSHOT_RETAIN = 3 RAFT_TIMEOUT = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KVOperation ¶
all fields must be public otherwise raft will dismiss them in (de)serilization
type KVStore ¶
Data is exported because it needs to be serialized
func NewKVStore ¶
type NotLeaderError ¶
type NotLeaderError struct{}
func (*NotLeaderError) Error ¶
func (e *NotLeaderError) Error() string
Implement the Error method for NotLeaderError
type RaftNode ¶
type RaftNode struct { Raft *raft.Raft Consensus *raftp2p.Consensus Actor *raftp2p.Actor Transport *raft.NetworkTransport Config raft.Config Snapshots raft.SnapshotStore StableStore raft.StableStore LogStore raft.LogStore }
func NewRaftNode ¶
Click to show internal directories.
Click to hide internal directories.