Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KVStore ¶ added in v0.0.57
type KVStore struct { EtcdC chan KV ObjectsC chan KV ConfChangeC chan<- raftpb.ConfChange // channel for proposing updates Agent string // contains filtered or unexported fields }
a key-value store backed by raft
func NewKVStore ¶ added in v0.0.57
func (*KVStore) GetSnapshot ¶ added in v0.0.57
type RaftNode ¶ added in v0.0.57
type RaftNode struct { Peers []string // raft peer URLs TLSConfig *tls.Config // contains filtered or unexported fields }
A key-value stream backed by raft
func NewRaftNode ¶ added in v0.0.57
func NewRaftNode(raftnode *RaftNode, keys *keys.Keys, TLSConfig *tls.Config, id uint64, peers *node.Nodes, join bool, getSnapshot func() ([]byte, error), proposeC <-chan string, confChangeC <-chan raftpb.ConfChange) (*RaftNode, <-chan *Commit, <-chan error, <-chan *snap.Snapshotter)
newRaftNode initiates a raft instance and returns a committed log entry channel and error channel. Proposals for log updates are sent over the provided the proposal channel. All log entries are replayed over the commit channel, followed by a nil message (to indicate the channel is current), then new log entries. To shutdown, close proposeC and read errorC.
func (*RaftNode) IsIDRemoved ¶ added in v0.0.57
func (*RaftNode) ReportSnapshot ¶ added in v0.0.57
func (*RaftNode) ReportUnreachable ¶ added in v0.0.57
Click to show internal directories.
Click to hide internal directories.