forked from TrueCloudLab/frostfs-node
[#1615] morph: Switch to a more prioritized RPC node
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
7c0aa69d11
commit
17f7d0a2ee
4 changed files with 115 additions and 16 deletions
|
@ -24,6 +24,7 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/vm/vmstate"
|
||||
"github.com/nspcc-dev/neo-go/pkg/wallet"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
|
||||
"go.uber.org/atomic"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
|
@ -81,6 +82,11 @@ type Client struct {
|
|||
// establish connection to any of the
|
||||
// provided RPC endpoints
|
||||
inactive bool
|
||||
|
||||
// indicates that Client has already started
|
||||
// goroutine that tries to switch to the higher
|
||||
// priority RPC node
|
||||
switchIsActive atomic.Bool
|
||||
}
|
||||
|
||||
type cache struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue