raft: add comment for Compact interface of Node

This commit is contained in:
Xiang Li 2014-10-06 14:19:18 +08:00
parent 5587e0d73f
commit 7fe4385ef9

View File

@ -104,7 +104,12 @@ type Node interface {
ApplyConfChange(cc pb.ConfChange)
// Stop performs any necessary termination of the Node
Stop()
// Compact
// Compact discards the entrire log up to the given index. It also
// generates a raft snapshot containing the given nodes configuration
// and the given snapshot data.
// It is the caller's responsibility to ensure the given configuration
// and snapshot data match the actual point-in-time configuration and snapshot
// at the given index.
Compact(index int64, nodes []int64, d []byte)
}