MCPcopy
hub / github.com/openziti/ziti / InitializeRaftFromBoltDb

Method InitializeRaftFromBoltDb

controller/controller.go:721–731  ·  view source on GitHub ↗
(sourceDbPath string)

Source from the content-addressed store, hash-verified

719}
720
721func (c *Controller) InitializeRaftFromBoltDb(sourceDbPath string) error {
722 if c.raftController == nil {
723 return errors.New("can't initialize non-raft controller using initialize from db")
724 }
725
726 if c.raftController.IsBootstrapped() {
727 return errors.New("raft is already bootstrapped, must start with a uninitialized controller")
728 }
729
730 return c.RaftRestoreFromBoltDb(sourceDbPath)
731}
732
733func (c *Controller) RaftRestoreFromBoltDb(sourceDbPath string) error {
734 log := pfxlog.Logger()

Callers 2

agentOpInitFromDbMethod · 0.95

Calls 3

RaftRestoreFromBoltDbMethod · 0.95
IsBootstrappedMethod · 0.80
NewMethod · 0.65

Tested by

no test coverage detected