etcd/raft/snapshot.go
Blake Mizerany ad307c6965 raft: go fmt
2014-09-03 09:20:14 -07:00

18 lines
281 B
Go

package raft
var emptySnapshot = Snapshot{}
type Snapshot struct {
Data []byte
// the configuration
Nodes []int64
// the index at which the snapshot was taken.
Index int64
// the log term of the index
Term int64
}
func (s Snapshot) IsEmpty() bool {
return s.Term == 0
}