forked from TrueCloudLab/frostfs-api-go
[#151] sdk/netmap: Add public key getter for node
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
c43f7d816d
commit
3347e53cde
1 changed files with 5 additions and 0 deletions
|
@ -44,6 +44,11 @@ func (n Node) NetworkAddress() string {
|
|||
return n.InfoV2.GetAddress()
|
||||
}
|
||||
|
||||
// PublicKey returns public key of the node in bytes.
|
||||
func (n Node) PublicKey() []byte {
|
||||
return n.InfoV2.GetPublicKey()
|
||||
}
|
||||
|
||||
// NodesFromV2 converts slice of v2 netmap.NodeInfo to a generic node slice.
|
||||
func NodesFromV2(infos []netmap.NodeInfo) Nodes {
|
||||
nodes := make(Nodes, len(infos))
|
||||
|
|
Loading…
Reference in a new issue