[#312] netmap: Support multiple addresses in NodeInfo

In latest NeoFS API changes `NodeInfo` message carries list of network
addresses. There is a need

Add `SetAddresses` / `IterateAddresses` / `NumberOfAddresses` methods to
provide the access to node's address group. Mark `Address` / `SetAddress`
methods as deprecated.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-06-18 19:08:55 +03:00 committed by Leonard Lyubich
parent 6d531a07a5
commit 07fcaa4ba5
9 changed files with 159 additions and 70 deletions

View file

@ -84,7 +84,7 @@ func NodeAttribute() *netmap.NodeAttribute {
func NodeInfo() *netmap.NodeInfo {
x := netmap.NewNodeInfo()
x.SetAddress("address")
x.SetAddresses("address 1", "address 2")
x.SetPublicKey([]byte("public key"))
x.SetState(netmap.NodeStateOnline)
x.SetAttributes(NodeAttribute(), NodeAttribute())