service: init: do not create badger section when using Raft.
This commit is contained in:
parent
2311bdac19
commit
fc965f9528
|
@ -191,16 +191,17 @@ func (ch *ConfigHelper) init() {
|
|||
man.RegisterComponent(config.Informer, cfgs.Diskinf)
|
||||
man.RegisterComponent(config.Observations, cfgs.Metrics)
|
||||
man.RegisterComponent(config.Observations, cfgs.Tracing)
|
||||
man.RegisterComponent(config.Datastore, cfgs.Badger)
|
||||
|
||||
switch ch.consensus {
|
||||
case cfgs.Raft.ConfigKey():
|
||||
man.RegisterComponent(config.Consensus, cfgs.Raft)
|
||||
case cfgs.Crdt.ConfigKey():
|
||||
man.RegisterComponent(config.Consensus, cfgs.Crdt)
|
||||
man.RegisterComponent(config.Datastore, cfgs.Badger)
|
||||
default:
|
||||
man.RegisterComponent(config.Consensus, cfgs.Raft)
|
||||
man.RegisterComponent(config.Consensus, cfgs.Crdt)
|
||||
man.RegisterComponent(config.Datastore, cfgs.Badger)
|
||||
}
|
||||
|
||||
ch.identity = &config.Identity{}
|
||||
|
|
Loading…
Reference in New Issue
Block a user