Move to frostfs-node

Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
This commit is contained in:
Pavel Karpy 2022-12-23 20:35:35 +03:00 committed by Stanislav Bogatyrev
parent 42554a9298
commit 923f84722a
934 changed files with 3470 additions and 3451 deletions

View file

@ -1,16 +1,16 @@
package neofs
package frostfs
import (
"encoding/hex"
"github.com/TrueCloudLab/frostfs-node/pkg/morph/event"
frostfsEvent "github.com/TrueCloudLab/frostfs-node/pkg/morph/event/neofs"
"github.com/nspcc-dev/neo-go/pkg/util/slice"
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
neofsEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/neofs"
"go.uber.org/zap"
)
func (np *Processor) handleDeposit(ev event.Event) {
deposit := ev.(neofsEvent.Deposit)
deposit := ev.(frostfsEvent.Deposit)
np.log.Info("notification",
zap.String("type", "deposit"),
zap.String("id", hex.EncodeToString(slice.CopyReverse(deposit.ID()))))
@ -20,13 +20,13 @@ func (np *Processor) handleDeposit(ev event.Event) {
err := np.pool.Submit(func() { np.processDeposit(&deposit) })
if err != nil {
// there system can be moved into controlled degradation stage
np.log.Warn("neofs processor worker pool drained",
np.log.Warn("frostfs processor worker pool drained",
zap.Int("capacity", np.pool.Cap()))
}
}
func (np *Processor) handleWithdraw(ev event.Event) {
withdraw := ev.(neofsEvent.Withdraw)
withdraw := ev.(frostfsEvent.Withdraw)
np.log.Info("notification",
zap.String("type", "withdraw"),
zap.String("id", hex.EncodeToString(slice.CopyReverse(withdraw.ID()))))
@ -36,13 +36,13 @@ func (np *Processor) handleWithdraw(ev event.Event) {
err := np.pool.Submit(func() { np.processWithdraw(&withdraw) })
if err != nil {
// there system can be moved into controlled degradation stage
np.log.Warn("neofs processor worker pool drained",
np.log.Warn("frostfs processor worker pool drained",
zap.Int("capacity", np.pool.Cap()))
}
}
func (np *Processor) handleCheque(ev event.Event) {
cheque := ev.(neofsEvent.Cheque)
cheque := ev.(frostfsEvent.Cheque)
np.log.Info("notification",
zap.String("type", "cheque"),
zap.String("id", hex.EncodeToString(cheque.ID())))
@ -52,13 +52,13 @@ func (np *Processor) handleCheque(ev event.Event) {
err := np.pool.Submit(func() { np.processCheque(&cheque) })
if err != nil {
// there system can be moved into controlled degradation stage
np.log.Warn("neofs processor worker pool drained",
np.log.Warn("frostfs processor worker pool drained",
zap.Int("capacity", np.pool.Cap()))
}
}
func (np *Processor) handleConfig(ev event.Event) {
cfg := ev.(neofsEvent.Config)
cfg := ev.(frostfsEvent.Config)
np.log.Info("notification",
zap.String("type", "set config"),
zap.String("key", hex.EncodeToString(cfg.Key())),
@ -69,13 +69,13 @@ func (np *Processor) handleConfig(ev event.Event) {
err := np.pool.Submit(func() { np.processConfig(&cfg) })
if err != nil {
// there system can be moved into controlled degradation stage
np.log.Warn("neofs processor worker pool drained",
np.log.Warn("frostfs processor worker pool drained",
zap.Int("capacity", np.pool.Cap()))
}
}
func (np *Processor) handleBind(ev event.Event) {
e := ev.(neofsEvent.Bind)
e := ev.(frostfsEvent.Bind)
np.log.Info("notification",
zap.String("type", "bind"),
)
@ -85,13 +85,13 @@ func (np *Processor) handleBind(ev event.Event) {
err := np.pool.Submit(func() { np.processBind(e) })
if err != nil {
// there system can be moved into controlled degradation stage
np.log.Warn("neofs processor worker pool drained",
np.log.Warn("frostfs processor worker pool drained",
zap.Int("capacity", np.pool.Cap()))
}
}
func (np *Processor) handleUnbind(ev event.Event) {
e := ev.(neofsEvent.Unbind)
e := ev.(frostfsEvent.Unbind)
np.log.Info("notification",
zap.String("type", "unbind"),
)
@ -101,7 +101,7 @@ func (np *Processor) handleUnbind(ev event.Event) {
err := np.pool.Submit(func() { np.processBind(e) })
if err != nil {
// there system can be moved into controlled degradation stage
np.log.Warn("neofs processor worker pool drained",
np.log.Warn("frostfs processor worker pool drained",
zap.Int("capacity", np.pool.Cap()))
}
}