MCPcopy
hub / github.com/dgraph-io/dgraph / Snapshot

Method Snapshot

conn/node.go:272–277  ·  view source on GitHub ↗

Snapshot returns the current snapshot.

()

Source from the content-addressed store, hash-verified

270
271// Snapshot returns the current snapshot.
272func (n *Node) Snapshot() (raftpb.Snapshot, error) {
273 if n == nil || n.Store == nil {
274 return raftpb.Snapshot{}, errors.New("Uninitialized node or raft store")
275 }
276 return n.Store.Snapshot()
277}
278
279// SaveToStorage saves the hard state, entries, and snapshot to persistent storage, in that order.
280func (n *Node) SaveToStorage(h *raftpb.HardState, es []raftpb.Entry, s *raftpb.Snapshot) {

Callers 6

NewNodeFunction · 0.45
PastLifeMethod · 0.45
applySnapshotMethod · 0.45
initAndStartNodeMethod · 0.45
printBasicFunction · 0.45
overwriteSnapshotFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected