[#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:
parent
8aa290c8c3
commit
91cc33bdb9
1 changed files with 15 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue