raftexample: Implement ReportUnreachable and ReportSnapshot

This commit is contained in:
Shintaro Murakami 2021-02-17 11:59:32 +09:00
parent 73c50b869a
commit 2d25f7f3da

View File

@ -484,6 +484,8 @@ func (rc *raftNode) serveRaft() {
func (rc *raftNode) Process(ctx context.Context, m raftpb.Message) error {
return rc.node.Step(ctx, m)
}
func (rc *raftNode) IsIDRemoved(id uint64) bool { return false }
func (rc *raftNode) ReportUnreachable(id uint64) {}
func (rc *raftNode) ReportSnapshot(id uint64, status raft.SnapshotStatus) {}
func (rc *raftNode) IsIDRemoved(id uint64) bool { return false }
func (rc *raftNode) ReportUnreachable(id uint64) { rc.node.ReportUnreachable(id) }
func (rc *raftNode) ReportSnapshot(id uint64, status raft.SnapshotStatus) {
rc.node.ReportSnapshot(id, status)
}