Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrWrongPublicKey = errors.New("public key is different from the key in the network map")
ErrWrongPublicKey is returned when the client's response is signed with a key different from the one declared in the network map.
Functions ¶
func AssertKeyResponseCallback ¶ added in v0.26.0
func AssertKeyResponseCallback(expectedKey []byte) func(client.ResponseMetaInfo) error
AssertKeyResponseCallback returns client response callback which checks if the response was signed by expected key. Returns ErrWrongPublicKey in case of key mismatch.
func NodeInfoFromNetmapElement ¶ added in v0.26.0
func NodeInfoFromNetmapElement(dst *NodeInfo, info interface { PublicKey() []byte Addresses() network.AddressGroup })
NodeInfoFromNetmapElement fills NodeInfo structure from the interface of parsed netmap member's descriptor.
Args must not be nil.
func NodeInfoFromRawNetmapElement ¶ added in v0.26.0
func NodeInfoFromRawNetmapElement(dst *NodeInfo, info interface { PublicKey() []byte IterateAddresses(func(string) bool) NumberOfAddresses() int }) error
NodeInfoFromRawNetmapElement fills NodeInfo structure from the interface of raw netmap member's descriptor.
Args must not be nil.
Types ¶
type Client ¶
type Client interface { client.Client // RawForAddress must return rawclient.Client // for the passed network.Address. RawForAddress(network.Address) *rawclient.Client }
Client is an interface of NeoFS storage node's client.
type NodeInfo ¶ added in v0.26.0
type NodeInfo struct {
// contains filtered or unexported fields
}
NodeInfo groups information about NeoFS storage node needed for Client construction.
func (NodeInfo) AddressGroup ¶ added in v0.26.0
func (x NodeInfo) AddressGroup() network.AddressGroup
AddressGroup returns group of network addresses.
func (*NodeInfo) PublicKey ¶ added in v0.26.0
PublicKey returns public key in a binary format.
Result must not be mutated.
func (*NodeInfo) SetAddressGroup ¶ added in v0.26.0
func (x *NodeInfo) SetAddressGroup(v network.AddressGroup)
SetAddressGroup sets group of network addresses.
func (*NodeInfo) SetPublicKey ¶ added in v0.26.0
SetPublicKey sets public key in a binary format.
Argument must not be mutated.