frostfs-node/pkg/innerring/processors/governance/handlers.go
Alex Vanin d0d1731af7 [#447] innerring: Define governance processor
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-26 12:38:42 +03:00

19 lines
483 B
Go

package governance
import (
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
"go.uber.org/zap"
)
func (gp *Processor) HandleAlphabetSync(_ event.Event) {
gp.log.Info("new event", zap.String("type", "sync"))
// send event to the worker pool
err := gp.pool.Submit(func() { gp.processAlphabetSync() })
if err != nil {
// there system can be moved into controlled degradation stage
gp.log.Warn("governance worker pool drained",
zap.Int("capacity", gp.pool.Cap()))
}
}