2021-06-21 14:13:08 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neofs-api-go/pkg/client"
|
|
|
|
rawclient "github.com/nspcc-dev/neofs-api-go/rpc/client"
|
|
|
|
"github.com/nspcc-dev/neofs-node/pkg/network"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Client is an interface of NeoFS storage
|
|
|
|
// node's client.
|
|
|
|
type Client interface {
|
|
|
|
client.Client
|
|
|
|
|
|
|
|
// RawForAddress must return rawclient.Client
|
|
|
|
// for the passed network.Address.
|
|
|
|
RawForAddress(network.Address) *rawclient.Client
|
|
|
|
}
|
2021-09-28 04:42:31 +00:00
|
|
|
|
|
|
|
// 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
|
|
|
|
}
|