[#645] core/client: Define node information structure

Define `client.NodeInfo` structure which groups data required for API client
construction.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-28 07:42:31 +03:00 committed by Alex Vanin
parent 8aa290c8c3
commit 91cc33bdb9

View file

@ -15,3 +15,18 @@ type Client interface {
// for the passed network.Address.
RawForAddress(network.Address) *rawclient.Client
}
// NodeInfo groups information about NeoFS storage node needed for Client construction.
type NodeInfo struct {
addrGroup network.AddressGroup
}
// SetAddressGroup sets group of network addresses.
func (x *NodeInfo) SetAddressGroup(v network.AddressGroup) {
x.addrGroup = v
}
// AddressGroup returns group of network addresses.
func (x NodeInfo) AddressGroup() network.AddressGroup {
return x.addrGroup
}