[#312] cmd/node: Implement HealthStatus method on node application

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-01-15 13:23:46 +03:00 committed by Alex Vanin
parent f327024ee7
commit 147399f547
2 changed files with 14 additions and 3 deletions

View file

@ -184,6 +184,8 @@ type cfg struct {
cfgControlService cfgControlService
netStatus *atomic.Int32
healthStatus *atomic.Int32
}
@ -342,7 +344,8 @@ func initCfg(path string) *cfg {
cfgObject: cfgObject{
pool: initObjectPool(viperCfg),
},
healthStatus: atomic.NewInt32(int32(control.NetmapStatus_STATUS_UNDEFINED)),
netStatus: atomic.NewInt32(int32(control.NetmapStatus_STATUS_UNDEFINED)),
healthStatus: atomic.NewInt32(int32(control.HealthStatus_HEALTH_STATUS_UNDEFINED)),
}
initLocalStorage(c)