weaveworks- type Proposer interface { ProposeEntry(Entry) error ProposeConfChange(ConfChange) error } type CommitReceiver interface { ReceiveCommit(Entry) } type ErrorReceiver interface { ReceiveError(error) } func main() { n := newRaftNode(...) s := newStore(...) a := newAPI(...) n.commitReceiver = s n.errorReceiver = s a.store = s a.proposer = n // ... }
weaveworks- type Proposer interface { ProposeEntry(Entry) error ProposeConfChange(ConfChange) error } type CommitReceiver interface { ReceiveCommit(Entry) } type ErrorReceiver interface { ReceiveError(error) } func main() { n := newRaftNode(...) s := newStore(...) a := newAPI(...) n.commitReceiver = s n.errorReceiver = s a.store = s a.proposer = n // ... } ✕
weaveworks- type raftNode struct { node raft.Node incomingc unreachablec confchangec proposalc outgoingc chanentryc chansnapshotc chanremovedc chanstopc chan struct{} // from the user terminatedc chan struct{} // to the user // storage? }
weaveworks- type raftNode struct { node raft.Node incomingc unreachablec confchangec proposalc outgoingc chanentryc chansnapshotc chanremovedc chanstopc chan struct{} // from the user terminatedc chan struct{} // to the user // storage? }
weaveworks- type raftNode struct { node raft.Node incomingc unreachablec confchangec proposalc outgoingc chanentryc chansnapshotc chanremovedc chanstopc chan struct{} // from the user terminatedc chan struct{} // to the user // storage? }
weaveworks- type raftNode struct { node raft.Node incomingc unreachablec confchangec proposalc outgoingc chanentryc chansnapshotc chanremovedc chanstopc chan struct{} // from the user terminatedc chan struct{} // to the user // storage? }
weaveworks- type raftNode struct { node raft.Node incomingc unreachablec confchangec proposalc outgoingc chanentryc chansnapshotc chanremovedc chanstopc chan struct{} // from the user terminatedc chan struct{} // to the user // storage? }