(sourceDbPath string)
| 719 | } |
| 720 | |
| 721 | func (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 | |
| 733 | func (c *Controller) RaftRestoreFromBoltDb(sourceDbPath string) error { |
| 734 | log := pfxlog.Logger() |
no test coverage detected