MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / Close

Method Close

lib/raft/raft_impl.go:22–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func (i *Impl) Close() error {
23 // close the raft node
24 err := i.m.Raft.Shutdown().Error()
25 if err != nil {
26 return nil
27 }
28 // close the raft log store
29 err = i.m.RaftLog.Close()
30 return err
31}
32
33func (i *Impl) IsLeader() bool {
34 return i.m.Raft.State() == raft.Leader

Callers

nothing calls this directly

Calls 2

ShutdownMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected