[#1614] node: Update health metric on its change

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-07-19 18:17:12 +03:00 committed by fyrchik
parent 581a9901c9
commit a4ed91f9b5

View file

@ -70,6 +70,10 @@ func (c *cfg) NetmapStatus() control.NetmapStatus {
func (c *cfg) setHealthStatus(st control.HealthStatus) {
c.healthStatus.Store(int32(st))
if c.metricsCollector != nil {
c.metricsCollector.SetHealth(int32(st))
}
}
func (c *cfg) HealthStatus() control.HealthStatus {