[#705] pkg/morph/netmap: Add innerRingList method

Add `innerRingList` method to `netmap` client
wrapper. Method parses current IR nodes list.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-07-19 20:15:41 +03:00 committed by Alex Vanin
parent 00b487e3c3
commit b3c81116b9
2 changed files with 68 additions and 1 deletions

View file

@ -33,6 +33,7 @@ type Option func(*cfg)
type cfg struct {
addPeerMethod, // add peer method name for invocation
newEpochMethod, // new epoch method name for invocation
innerRingList, // get innerring list method name for invocation
netMapMethod, // get network map method name
netMapCandidatesMethod, // get network candidates method name
snapshotMethod, // get network map snapshot method name
@ -48,6 +49,7 @@ const (
defaultAddPeerMethod = "addPeer" // default add peer method name
defaultConfigMethod = "config" // default get config value method name
defaultEpochMethod = "epoch" // default get epoch number method name
defaultInnerRingListMethod = "innerRingList" // default get innerring list method name
defaultNetMapCandidateMethod = "netmapCandidates" // default get network candidates method name
defaultNetMapMethod = "netmap" // default get network map method name
defaultNewEpochMethod = "newEpoch" // default new epoch method name
@ -64,6 +66,7 @@ func defaultConfig() *cfg {
addPeerMethod: defaultAddPeerMethod,
configMethod: defaultConfigMethod,
epochMethod: defaultEpochMethod,
innerRingList: defaultInnerRingListMethod,
netMapCandidatesMethod: defaultNetMapCandidateMethod,
netMapMethod: defaultNetMapMethod,
newEpochMethod: defaultNewEpochMethod,