mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: remove the applysnap from Storage interface
This commit is contained in:
parent
e23f9e76d1
commit
732cfa1ad6
@ -52,9 +52,6 @@ type Storage interface {
|
||||
FirstIndex() (uint64, error)
|
||||
// Snapshot returns the most recent snapshot.
|
||||
Snapshot() (pb.Snapshot, error)
|
||||
// ApplySnapshot overwrites the contents of this Storage object with
|
||||
// those of the given snapshot.
|
||||
ApplySnapshot(pb.Snapshot) error
|
||||
}
|
||||
|
||||
// MemoryStorage implements the Storage interface backed by an
|
||||
@ -133,7 +130,8 @@ func (ms *MemoryStorage) Snapshot() (pb.Snapshot, error) {
|
||||
return ms.snapshot, nil
|
||||
}
|
||||
|
||||
// ApplySnapshot implements the Storage interface.
|
||||
// ApplySnapshot overwrites the contents of this Storage object with
|
||||
// those of the given snapshot.
|
||||
func (ms *MemoryStorage) ApplySnapshot(snap pb.Snapshot) error {
|
||||
ms.Lock()
|
||||
defer ms.Unlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user