forked from TrueCloudLab/frostfs-node
[#381] *: Move to sync/atomic
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
ff570847a4
commit
4b768fd115
21 changed files with 77 additions and 64 deletions
|
@ -153,7 +153,7 @@ func (s *Server) ResetEpochTimer(h uint32) error {
|
|||
}
|
||||
|
||||
func (s *Server) setHealthStatus(hs control.HealthStatus) {
|
||||
s.healthStatus.Store(hs)
|
||||
s.healthStatus.Store(int32(hs))
|
||||
if s.metrics != nil {
|
||||
s.metrics.SetHealth(int32(hs))
|
||||
}
|
||||
|
@ -161,7 +161,7 @@ func (s *Server) setHealthStatus(hs control.HealthStatus) {
|
|||
|
||||
// HealthStatus returns the current health status of the IR application.
|
||||
func (s *Server) HealthStatus() control.HealthStatus {
|
||||
return s.healthStatus.Load().(control.HealthStatus)
|
||||
return control.HealthStatus(s.healthStatus.Load())
|
||||
}
|
||||
|
||||
func initPersistentStateStorage(cfg *viper.Viper) (*state.PersistentStorage, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue