forked from TrueCloudLab/frostfs-sdk-go
[#312] netmap: Support NetmapService.NetmapSnapshot
RPC
Extend functionality of `NetMap` type. Add `NetMapSnapshot` operation to `client` package. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f2f97f656d
commit
664392afc2
6 changed files with 210 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
package netmaptest
|
||||
|
||||
import (
|
||||
"math/rand"
|
||||
|
||||
"github.com/nspcc-dev/neofs-sdk-go/netmap"
|
||||
subnetidtest "github.com/nspcc-dev/neofs-sdk-go/subnet/id/test"
|
||||
)
|
||||
|
@ -68,3 +70,14 @@ func NetworkInfo() (x netmap.NetworkInfo) {
|
|||
|
||||
return
|
||||
}
|
||||
|
||||
// NodeInfo returns random netmap.NodeInfo.
|
||||
func NodeInfo() (x netmap.NodeInfo) {
|
||||
key := make([]byte, 33)
|
||||
rand.Read(key)
|
||||
|
||||
x.SetPublicKey(key)
|
||||
x.SetNetworkEndpoints("1", "2", "3")
|
||||
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue