[#313] control: Rename HealthStatus enum to NetmapStatus
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
a89567a88d
commit
83d4420a30
16 changed files with 98 additions and 98 deletions
|
@ -342,7 +342,7 @@ func initCfg(path string) *cfg {
|
|||
cfgObject: cfgObject{
|
||||
pool: initObjectPool(viperCfg),
|
||||
},
|
||||
healthStatus: atomic.NewInt32(int32(control.HealthStatus_STATUS_UNDEFINED)),
|
||||
healthStatus: atomic.NewInt32(int32(control.NetmapStatus_STATUS_UNDEFINED)),
|
||||
}
|
||||
|
||||
initLocalStorage(c)
|
||||
|
|
|
@ -68,10 +68,10 @@ func initControlService(c *cfg) {
|
|||
}))
|
||||
}
|
||||
|
||||
func (c *cfg) setHealthStatus(st control.HealthStatus) {
|
||||
func (c *cfg) setNetmapStatus(st control.NetmapStatus) {
|
||||
c.healthStatus.Store(int32(st))
|
||||
}
|
||||
|
||||
func (c *cfg) HealthStatus() control.HealthStatus {
|
||||
return control.HealthStatus(c.healthStatus.Load())
|
||||
func (c *cfg) NetmapStatus() control.NetmapStatus {
|
||||
return control.NetmapStatus(c.healthStatus.Load())
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ func bootUp(c *cfg) {
|
|||
bootstrapNode(c)
|
||||
startWorkers(c)
|
||||
|
||||
c.setHealthStatus(control.HealthStatus_ONLINE)
|
||||
c.setNetmapStatus(control.NetmapStatus_ONLINE)
|
||||
}
|
||||
|
||||
func wait(c *cfg) {
|
||||
|
|
|
@ -117,7 +117,7 @@ func addNewEpochNotificationHandler(c *cfg, h event.Handler) {
|
|||
}
|
||||
|
||||
func goOffline(c *cfg) {
|
||||
c.setHealthStatus(control.HealthStatus_OFFLINE)
|
||||
c.setNetmapStatus(control.NetmapStatus_OFFLINE)
|
||||
|
||||
err := c.cfgNetmap.wrapper.UpdatePeerState(
|
||||
crypto.MarshalPublicKey(&c.key.PublicKey),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue