From 91cc33bdb985cfaac9abfc0d4b0b6c585ffc64f1 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 28 Sep 2021 07:42:31 +0300 Subject: [PATCH] [#645] core/client: Define node information structure Define `client.NodeInfo` structure which groups data required for API client construction. Signed-off-by: Leonard Lyubich --- pkg/core/client/client.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pkg/core/client/client.go b/pkg/core/client/client.go index 80b676534c..46504bab4a 100644 --- a/pkg/core/client/client.go +++ b/pkg/core/client/client.go @@ -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 +}