Documentation ¶
Index ¶
- Variables
- func RegisterNetmapServiceServer(s *grpc2.Server, srv NetmapServiceServer)
- type Clause
- type Client
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)deprecated
- func (x *Filter) GetFilters() []*Filter
- func (x *Filter) GetKey() string
- func (x *Filter) GetName() string
- func (x *Filter) GetOp() Operation
- func (x *Filter) GetValue() string
- func (*Filter) ProtoMessage()
- func (x *Filter) ProtoReflect() protoreflect.Message
- func (x *Filter) Reset()
- func (m *Filter) SetFilters(v []*Filter)
- func (m *Filter) SetKey(v string)
- func (m *Filter) SetName(v string)
- func (m *Filter) SetOp(v Operation)
- func (m *Filter) SetValue(v string)
- func (x *Filter) String() string
- type LocalNodeInfoRequest
- func (*LocalNodeInfoRequest) Descriptor() ([]byte, []int)deprecated
- func (x *LocalNodeInfoRequest) GetBody() *LocalNodeInfoRequest_Body
- func (x *LocalNodeInfoRequest) GetMetaHeader() *grpc.RequestMetaHeader
- func (x *LocalNodeInfoRequest) GetVerifyHeader() *grpc.RequestVerificationHeader
- func (*LocalNodeInfoRequest) ProtoMessage()
- func (x *LocalNodeInfoRequest) ProtoReflect() protoreflect.Message
- func (x *LocalNodeInfoRequest) Reset()
- func (m *LocalNodeInfoRequest) SetBody(v *LocalNodeInfoRequest_Body)
- func (m *LocalNodeInfoRequest) SetMetaHeader(v *session.RequestMetaHeader)
- func (m *LocalNodeInfoRequest) SetVerifyHeader(v *session.RequestVerificationHeader)
- func (x *LocalNodeInfoRequest) String() string
- type LocalNodeInfoRequest_Body
- type LocalNodeInfoResponse
- func (*LocalNodeInfoResponse) Descriptor() ([]byte, []int)deprecated
- func (x *LocalNodeInfoResponse) GetBody() *LocalNodeInfoResponse_Body
- func (x *LocalNodeInfoResponse) GetMetaHeader() *grpc.ResponseMetaHeader
- func (x *LocalNodeInfoResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader
- func (*LocalNodeInfoResponse) ProtoMessage()
- func (x *LocalNodeInfoResponse) ProtoReflect() protoreflect.Message
- func (x *LocalNodeInfoResponse) Reset()
- func (m *LocalNodeInfoResponse) SetBody(v *LocalNodeInfoResponse_Body)
- func (m *LocalNodeInfoResponse) SetMetaHeader(v *session.ResponseMetaHeader)
- func (m *LocalNodeInfoResponse) SetVerifyHeader(v *session.ResponseVerificationHeader)
- func (x *LocalNodeInfoResponse) String() string
- type LocalNodeInfoResponse_Body
- func (*LocalNodeInfoResponse_Body) Descriptor() ([]byte, []int)deprecated
- func (x *LocalNodeInfoResponse_Body) GetNodeInfo() *NodeInfo
- func (x *LocalNodeInfoResponse_Body) GetVersion() *grpc1.Version
- func (*LocalNodeInfoResponse_Body) ProtoMessage()
- func (x *LocalNodeInfoResponse_Body) ProtoReflect() protoreflect.Message
- func (x *LocalNodeInfoResponse_Body) Reset()
- func (m *LocalNodeInfoResponse_Body) SetNodeInfo(v *NodeInfo)
- func (m *LocalNodeInfoResponse_Body) SetVersion(v *refs.Version)
- func (x *LocalNodeInfoResponse_Body) String() string
- type NetmapServiceClient
- type NetmapServiceServer
- type NodeInfo
- func (*NodeInfo) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfo) GetAddress() string
- func (x *NodeInfo) GetAttributes() []*NodeInfo_Attribute
- func (x *NodeInfo) GetPublicKey() []byte
- func (x *NodeInfo) GetState() NodeInfo_State
- func (*NodeInfo) ProtoMessage()
- func (x *NodeInfo) ProtoReflect() protoreflect.Message
- func (x *NodeInfo) Reset()
- func (m *NodeInfo) SetAddress(v string)
- func (m *NodeInfo) SetAttributes(v []*NodeInfo_Attribute)
- func (m *NodeInfo) SetPublicKey(v []byte)
- func (m *NodeInfo) SetState(v NodeInfo_State)
- func (x *NodeInfo) String() string
- type NodeInfo_Attribute
- func (*NodeInfo_Attribute) Descriptor() ([]byte, []int)deprecated
- func (x *NodeInfo_Attribute) GetKey() string
- func (x *NodeInfo_Attribute) GetParents() []string
- func (x *NodeInfo_Attribute) GetValue() string
- func (*NodeInfo_Attribute) ProtoMessage()
- func (x *NodeInfo_Attribute) ProtoReflect() protoreflect.Message
- func (x *NodeInfo_Attribute) Reset()
- func (m *NodeInfo_Attribute) SetKey(v string)
- func (m *NodeInfo_Attribute) SetParents(v []string)
- func (m *NodeInfo_Attribute) SetValue(v string)
- func (x *NodeInfo_Attribute) String() string
- type NodeInfo_State
- func (NodeInfo_State) Descriptor() protoreflect.EnumDescriptor
- func (x NodeInfo_State) Enum() *NodeInfo_State
- func (NodeInfo_State) EnumDescriptor() ([]byte, []int)deprecated
- func (x NodeInfo_State) Number() protoreflect.EnumNumber
- func (x NodeInfo_State) String() string
- func (NodeInfo_State) Type() protoreflect.EnumType
- type Operation
- type Option
- type PlacementPolicy
- func (*PlacementPolicy) Descriptor() ([]byte, []int)deprecated
- func (x *PlacementPolicy) GetContainerBackupFactor() uint32
- func (x *PlacementPolicy) GetFilters() []*Filter
- func (x *PlacementPolicy) GetReplicas() []*Replica
- func (x *PlacementPolicy) GetSelectors() []*Selector
- func (*PlacementPolicy) ProtoMessage()
- func (x *PlacementPolicy) ProtoReflect() protoreflect.Message
- func (x *PlacementPolicy) Reset()
- func (m *PlacementPolicy) SetContainerBackupFactor(v uint32)
- func (m *PlacementPolicy) SetFilters(v []*Filter)
- func (m *PlacementPolicy) SetReplicas(v []*Replica)
- func (m *PlacementPolicy) SetSelectors(v []*Selector)
- func (x *PlacementPolicy) String() string
- type Replica
- func (*Replica) Descriptor() ([]byte, []int)deprecated
- func (x *Replica) GetCount() uint32
- func (x *Replica) GetSelector() string
- func (*Replica) ProtoMessage()
- func (x *Replica) ProtoReflect() protoreflect.Message
- func (x *Replica) Reset()
- func (m *Replica) SetCount(v uint32)
- func (m *Replica) SetSelector(v string)
- func (x *Replica) String() string
- type Selector
- func (*Selector) Descriptor() ([]byte, []int)deprecated
- func (x *Selector) GetAttribute() string
- func (x *Selector) GetClause() Clause
- func (x *Selector) GetCount() uint32
- func (x *Selector) GetFilter() string
- func (x *Selector) GetName() string
- func (*Selector) ProtoMessage()
- func (x *Selector) ProtoReflect() protoreflect.Message
- func (x *Selector) Reset()
- func (m *Selector) SetAttribute(v string)
- func (m *Selector) SetClause(v Clause)
- func (m *Selector) SetCount(v uint32)
- func (m *Selector) SetFilter(v string)
- func (m *Selector) SetName(v string)
- func (x *Selector) String() string
- type UnimplementedNetmapServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( Operation_name = map[int32]string{ 0: "OPERATION_UNSPECIFIED", 1: "EQ", 2: "NE", 3: "GT", 4: "GE", 5: "LT", 6: "LE", 7: "OR", 8: "AND", } Operation_value = map[string]int32{ "OPERATION_UNSPECIFIED": 0, "EQ": 1, "NE": 2, "GT": 3, "GE": 4, "LT": 5, "LE": 6, "OR": 7, "AND": 8, } )
Enum value maps for Operation.
var ( Clause_name = map[int32]string{ 0: "CLAUSE_UNSPECIFIED", 1: "SAME", 2: "DISTINCT", } Clause_value = map[string]int32{ "CLAUSE_UNSPECIFIED": 0, "SAME": 1, "DISTINCT": 2, } )
Enum value maps for Clause.
var ( NodeInfo_State_name = map[int32]string{ 0: "UNSPECIFIED", 1: "ONLINE", 2: "OFFLINE", } NodeInfo_State_value = map[string]int32{ "UNSPECIFIED": 0, "ONLINE": 1, "OFFLINE": 2, } )
Enum value maps for NodeInfo_State.
var ErrNilNetmapServiceClient = errors.New("netmap gRPC client is nil")
ErrNilNetmapServiceClient is returned by functions that expect a non-nil ContainerServiceClient, but received nil.
var File_v2_netmap_grpc_service_proto protoreflect.FileDescriptor
var File_v2_netmap_grpc_types_proto protoreflect.FileDescriptor
Functions ¶
func RegisterNetmapServiceServer ¶
func RegisterNetmapServiceServer(s *grpc2.Server, srv NetmapServiceServer)
Types ¶
type Clause ¶
type Clause int32
Selector modifier shows how the node set will be formed. By default selector just groups nodes into a bucket by attribute, selecting nodes only by their hash distance.
const ( // No modifier defined. Will select nodes from bucket randomly. Clause_CLAUSE_UNSPECIFIED Clause = 0 // SAME will select only nodes having the same value of bucket attribute Clause_SAME Clause = 1 // DISTINCT will select nodes having different values of bucket attribute Clause_DISTINCT Clause = 2 )
func (Clause) Descriptor ¶
func (Clause) Descriptor() protoreflect.EnumDescriptor
func (Clause) EnumDescriptor
deprecated
func (Clause) Number ¶
func (x Clause) Number() protoreflect.EnumNumber
func (Clause) Type ¶
func (Clause) Type() protoreflect.EnumType
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps NetmapServiceClient with pre-defined configurations.
func NewClient ¶
func NewClient(c NetmapServiceClient, opts ...Option) (*Client, error)
NewClient creates, initializes and returns a new Client instance.
Options are applied one by one in order.
func (*Client) LocalNodeInfo ¶
func (c *Client) LocalNodeInfo(ctx context.Context, req *LocalNodeInfoRequest) (*LocalNodeInfoResponse, error)
type Filter ¶
type Filter struct { // Name of the filter or a reference to the named filter. '*' means // application to the whole unfiltered NetworkMap. At top level it's used as a // filter name. At lower levels it's considered to be a reference to another // named filter Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Key to filter Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // Filtering operation Op Operation `protobuf:"varint,3,opt,name=op,proto3,enum=neo.fs.v2.netmap.Operation" json:"op,omitempty"` // Value to match Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` // List of inner filters. Top level operation will be applied to the whole // list. Filters []*Filter `protobuf:"bytes,5,rep,name=filters,proto3" json:"filters,omitempty"` // contains filtered or unexported fields }
Filter will return the subset of nodes from `NetworkMap` or another filter's results, that will satisfy filter's conditions.
func (*Filter) Descriptor
deprecated
func (*Filter) GetFilters ¶
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) ProtoReflect ¶
func (x *Filter) ProtoReflect() protoreflect.Message
func (*Filter) SetFilters ¶
SetFilters sets sub-filters of placement filter.
type LocalNodeInfoRequest ¶
type LocalNodeInfoRequest struct { // Body of the LocalNodeInfo request message Body *LocalNodeInfoRequest_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // Carries request meta information. Header data is used only to regulate // message transport and does not affect request execution. MetaHeader *grpc.RequestMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` // Carries request verification information. This header is used to // authenticate the nodes of the message route and check the correctness of // transmission. VerifyHeader *grpc.RequestVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` // contains filtered or unexported fields }
Get NodeInfo structure from the particular node directly
func (*LocalNodeInfoRequest) Descriptor
deprecated
func (*LocalNodeInfoRequest) Descriptor() ([]byte, []int)
Deprecated: Use LocalNodeInfoRequest.ProtoReflect.Descriptor instead.
func (*LocalNodeInfoRequest) GetBody ¶
func (x *LocalNodeInfoRequest) GetBody() *LocalNodeInfoRequest_Body
func (*LocalNodeInfoRequest) GetMetaHeader ¶
func (x *LocalNodeInfoRequest) GetMetaHeader() *grpc.RequestMetaHeader
func (*LocalNodeInfoRequest) GetVerifyHeader ¶
func (x *LocalNodeInfoRequest) GetVerifyHeader() *grpc.RequestVerificationHeader
func (*LocalNodeInfoRequest) ProtoMessage ¶
func (*LocalNodeInfoRequest) ProtoMessage()
func (*LocalNodeInfoRequest) ProtoReflect ¶
func (x *LocalNodeInfoRequest) ProtoReflect() protoreflect.Message
func (*LocalNodeInfoRequest) Reset ¶
func (x *LocalNodeInfoRequest) Reset()
func (*LocalNodeInfoRequest) SetBody ¶
func (m *LocalNodeInfoRequest) SetBody(v *LocalNodeInfoRequest_Body)
SetBody sets body of the request.
func (*LocalNodeInfoRequest) SetMetaHeader ¶
func (m *LocalNodeInfoRequest) SetMetaHeader(v *session.RequestMetaHeader)
SetMetaHeader sets meta header of the request.
func (*LocalNodeInfoRequest) SetVerifyHeader ¶
func (m *LocalNodeInfoRequest) SetVerifyHeader(v *session.RequestVerificationHeader)
SetVerifyHeader sets verification header of the request.
func (*LocalNodeInfoRequest) String ¶
func (x *LocalNodeInfoRequest) String() string
type LocalNodeInfoRequest_Body ¶
type LocalNodeInfoRequest_Body struct {
// contains filtered or unexported fields
}
LocalNodeInfo request body is empty.
func (*LocalNodeInfoRequest_Body) Descriptor
deprecated
func (*LocalNodeInfoRequest_Body) Descriptor() ([]byte, []int)
Deprecated: Use LocalNodeInfoRequest_Body.ProtoReflect.Descriptor instead.
func (*LocalNodeInfoRequest_Body) ProtoMessage ¶
func (*LocalNodeInfoRequest_Body) ProtoMessage()
func (*LocalNodeInfoRequest_Body) ProtoReflect ¶
func (x *LocalNodeInfoRequest_Body) ProtoReflect() protoreflect.Message
func (*LocalNodeInfoRequest_Body) Reset ¶
func (x *LocalNodeInfoRequest_Body) Reset()
func (*LocalNodeInfoRequest_Body) String ¶
func (x *LocalNodeInfoRequest_Body) String() string
type LocalNodeInfoResponse ¶
type LocalNodeInfoResponse struct { // Body of the balance response message. Body *LocalNodeInfoResponse_Body `protobuf:"bytes,1,opt,name=body,proto3" json:"body,omitempty"` // Carries response meta information. Header data is used only to regulate // message transport and does not affect response execution. MetaHeader *grpc.ResponseMetaHeader `protobuf:"bytes,2,opt,name=meta_header,json=metaHeader,proto3" json:"meta_header,omitempty"` // Carries response verification information. This header is used to // authenticate the nodes of the message route and check the correctness of // transmission. VerifyHeader *grpc.ResponseVerificationHeader `protobuf:"bytes,3,opt,name=verify_header,json=verifyHeader,proto3" json:"verify_header,omitempty"` // contains filtered or unexported fields }
Local Node Info, including API Version in use
func (*LocalNodeInfoResponse) Descriptor
deprecated
func (*LocalNodeInfoResponse) Descriptor() ([]byte, []int)
Deprecated: Use LocalNodeInfoResponse.ProtoReflect.Descriptor instead.
func (*LocalNodeInfoResponse) GetBody ¶
func (x *LocalNodeInfoResponse) GetBody() *LocalNodeInfoResponse_Body
func (*LocalNodeInfoResponse) GetMetaHeader ¶
func (x *LocalNodeInfoResponse) GetMetaHeader() *grpc.ResponseMetaHeader
func (*LocalNodeInfoResponse) GetVerifyHeader ¶
func (x *LocalNodeInfoResponse) GetVerifyHeader() *grpc.ResponseVerificationHeader
func (*LocalNodeInfoResponse) ProtoMessage ¶
func (*LocalNodeInfoResponse) ProtoMessage()
func (*LocalNodeInfoResponse) ProtoReflect ¶
func (x *LocalNodeInfoResponse) ProtoReflect() protoreflect.Message
func (*LocalNodeInfoResponse) Reset ¶
func (x *LocalNodeInfoResponse) Reset()
func (*LocalNodeInfoResponse) SetBody ¶
func (m *LocalNodeInfoResponse) SetBody(v *LocalNodeInfoResponse_Body)
SetBody sets body of the response.
func (*LocalNodeInfoResponse) SetMetaHeader ¶
func (m *LocalNodeInfoResponse) SetMetaHeader(v *session.ResponseMetaHeader)
SetMetaHeader sets meta header of the response.
func (*LocalNodeInfoResponse) SetVerifyHeader ¶
func (m *LocalNodeInfoResponse) SetVerifyHeader(v *session.ResponseVerificationHeader)
SetVerifyHeader sets verification header of the response.
func (*LocalNodeInfoResponse) String ¶
func (x *LocalNodeInfoResponse) String() string
type LocalNodeInfoResponse_Body ¶
type LocalNodeInfoResponse_Body struct { // Latest NeoFS API version in use Version *grpc1.Version `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` // NodeInfo structure with recent information from node itself NodeInfo *NodeInfo `protobuf:"bytes,2,opt,name=node_info,json=nodeInfo,proto3" json:"node_info,omitempty"` // contains filtered or unexported fields }
Local Node Info, including API Version in use.
func (*LocalNodeInfoResponse_Body) Descriptor
deprecated
func (*LocalNodeInfoResponse_Body) Descriptor() ([]byte, []int)
Deprecated: Use LocalNodeInfoResponse_Body.ProtoReflect.Descriptor instead.
func (*LocalNodeInfoResponse_Body) GetNodeInfo ¶
func (x *LocalNodeInfoResponse_Body) GetNodeInfo() *NodeInfo
func (*LocalNodeInfoResponse_Body) GetVersion ¶
func (x *LocalNodeInfoResponse_Body) GetVersion() *grpc1.Version
func (*LocalNodeInfoResponse_Body) ProtoMessage ¶
func (*LocalNodeInfoResponse_Body) ProtoMessage()
func (*LocalNodeInfoResponse_Body) ProtoReflect ¶
func (x *LocalNodeInfoResponse_Body) ProtoReflect() protoreflect.Message
func (*LocalNodeInfoResponse_Body) Reset ¶
func (x *LocalNodeInfoResponse_Body) Reset()
func (*LocalNodeInfoResponse_Body) SetNodeInfo ¶
func (m *LocalNodeInfoResponse_Body) SetNodeInfo(v *NodeInfo)
SetNodeInfo sets node info of response body.
func (*LocalNodeInfoResponse_Body) SetVersion ¶
func (m *LocalNodeInfoResponse_Body) SetVersion(v *refs.Version)
SetVersion sets version of response body.
func (*LocalNodeInfoResponse_Body) String ¶
func (x *LocalNodeInfoResponse_Body) String() string
type NetmapServiceClient ¶
type NetmapServiceClient interface { // Get NodeInfo structure from the particular node directly. Node information // can be taken from `Netmap` smart contract, but in some cases the one may // want to get recent information directly, or to talk to the node not yet // present in `Network Map` to find out what API version can be used for // further communication. Can also be used to check if node is up and running. LocalNodeInfo(ctx context.Context, in *LocalNodeInfoRequest, opts ...grpc2.CallOption) (*LocalNodeInfoResponse, error) }
NetmapServiceClient is the client API for NetmapService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewNetmapServiceClient ¶
func NewNetmapServiceClient(cc grpc2.ClientConnInterface) NetmapServiceClient
type NetmapServiceServer ¶
type NetmapServiceServer interface { // Get NodeInfo structure from the particular node directly. Node information // can be taken from `Netmap` smart contract, but in some cases the one may // want to get recent information directly, or to talk to the node not yet // present in `Network Map` to find out what API version can be used for // further communication. Can also be used to check if node is up and running. LocalNodeInfo(context.Context, *LocalNodeInfoRequest) (*LocalNodeInfoResponse, error) }
NetmapServiceServer is the server API for NetmapService service.
type NodeInfo ¶
type NodeInfo struct { // Public key of the NeoFS node in a binary format. PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // Ways to connect to a node Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // Carries list of the NeoFS node attributes in a string key-value format. Attributes []*NodeInfo_Attribute `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"` // Carries state of the NeoFS node. State NodeInfo_State `protobuf:"varint,4,opt,name=state,proto3,enum=neo.fs.v2.netmap.NodeInfo_State" json:"state,omitempty"` // contains filtered or unexported fields }
NeoFS node description
func (*NodeInfo) Descriptor
deprecated
func (*NodeInfo) GetAddress ¶
func (*NodeInfo) GetAttributes ¶
func (x *NodeInfo) GetAttributes() []*NodeInfo_Attribute
func (*NodeInfo) GetPublicKey ¶
func (*NodeInfo) GetState ¶
func (x *NodeInfo) GetState() NodeInfo_State
func (*NodeInfo) ProtoMessage ¶
func (*NodeInfo) ProtoMessage()
func (*NodeInfo) ProtoReflect ¶
func (x *NodeInfo) ProtoReflect() protoreflect.Message
func (*NodeInfo) SetAddress ¶
SetAddress sets node network address.
func (*NodeInfo) SetAttributes ¶
func (m *NodeInfo) SetAttributes(v []*NodeInfo_Attribute)
SetAttributes sets list of the node attributes.
func (*NodeInfo) SetPublicKey ¶
SetPublicKey sets node public key in a binary format.
type NodeInfo_Attribute ¶
type NodeInfo_Attribute struct { // Key of the node attribute. Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` // Value of the node attribute. Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // Parent keys, if any. For example for `City` it could be `Region` and // `Country`. Parents []string `protobuf:"bytes,3,rep,name=parents,proto3" json:"parents,omitempty"` // contains filtered or unexported fields }
Administrator-defined Attributes of the NeoFS Storage Node.
Node's attributes are mostly used during Storage Policy evaluation to calculate object's placement and find a set of nodes satisfying policy requirements. There are some "well-known" node attributes common to all the Storage Nodes in the network and used implicitly with default values if not explicitly set:
- Capacity \ Total available disk space in Gigabytes.
- Price \ Price in GAS tokens for storing one GB of data during one Epoch. In node attributes it's a string presenting floating point number with comma or point delimiter for decimal part. In the Network Map it will be saved as 64-bit unsigned integer representing number of minimal token fractions.
- Subnet \ String ID of Node's storage subnet. There can be only one subnet served by the Storage Node.
- Locode \ Node's geographic location in UN/LOCODE(https://www.unece.org/cefact/codesfortrade/codes_index.html) format approximated to the nearest point defined in standard.
- Country \ Country code in [ISO 3166-1_alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. Calculated automatically from `Locode` attribute
- Region \ Country's administative subdivision where node is located. Calculated automatically from `Locode` attribute based on `SubDiv` field. Presented in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
- City \ City, town, village or rural area name where node is located written without diacritics . Calculated automatically from `Locode` attribute.
For detailed description of each well-known attribute please see the corresponding section in NeoFS Technical specification.
func (*NodeInfo_Attribute) Descriptor
deprecated
func (*NodeInfo_Attribute) Descriptor() ([]byte, []int)
Deprecated: Use NodeInfo_Attribute.ProtoReflect.Descriptor instead.
func (*NodeInfo_Attribute) GetKey ¶
func (x *NodeInfo_Attribute) GetKey() string
func (*NodeInfo_Attribute) GetParents ¶
func (x *NodeInfo_Attribute) GetParents() []string
func (*NodeInfo_Attribute) GetValue ¶
func (x *NodeInfo_Attribute) GetValue() string
func (*NodeInfo_Attribute) ProtoMessage ¶
func (*NodeInfo_Attribute) ProtoMessage()
func (*NodeInfo_Attribute) ProtoReflect ¶
func (x *NodeInfo_Attribute) ProtoReflect() protoreflect.Message
func (*NodeInfo_Attribute) Reset ¶
func (x *NodeInfo_Attribute) Reset()
func (*NodeInfo_Attribute) SetKey ¶
func (m *NodeInfo_Attribute) SetKey(v string)
SetKey sets key to the node attribute.
func (*NodeInfo_Attribute) SetParents ¶
func (m *NodeInfo_Attribute) SetParents(v []string)
SetParent sets value of the node parents.
func (*NodeInfo_Attribute) SetValue ¶
func (m *NodeInfo_Attribute) SetValue(v string)
SetValue sets value of the node attribute.
func (*NodeInfo_Attribute) String ¶
func (x *NodeInfo_Attribute) String() string
type NodeInfo_State ¶
type NodeInfo_State int32
Represents the enumeration of various states of the NeoFS node.
const ( // Unknown state. NodeInfo_UNSPECIFIED NodeInfo_State = 0 // Active state in the network. NodeInfo_ONLINE NodeInfo_State = 1 // Network unavailable state. NodeInfo_OFFLINE NodeInfo_State = 2 )
func (NodeInfo_State) Descriptor ¶
func (NodeInfo_State) Descriptor() protoreflect.EnumDescriptor
func (NodeInfo_State) Enum ¶
func (x NodeInfo_State) Enum() *NodeInfo_State
func (NodeInfo_State) EnumDescriptor
deprecated
func (NodeInfo_State) EnumDescriptor() ([]byte, []int)
Deprecated: Use NodeInfo_State.Descriptor instead.
func (NodeInfo_State) Number ¶
func (x NodeInfo_State) Number() protoreflect.EnumNumber
func (NodeInfo_State) String ¶
func (x NodeInfo_State) String() string
func (NodeInfo_State) Type ¶
func (NodeInfo_State) Type() protoreflect.EnumType
type Operation ¶
type Operation int32
Operations on filters
const ( // No Operation defined Operation_OPERATION_UNSPECIFIED Operation = 0 // Equal Operation_EQ Operation = 1 // Not Equal Operation_NE Operation = 2 // Greater then Operation_GT Operation = 3 // Greater or equal Operation_GE Operation = 4 // Less then Operation_LT Operation = 5 // Less or equal Operation_LE Operation = 6 // Logical OR Operation_OR Operation = 7 // Logical AND Operation_AND Operation = 8 )
func (Operation) Descriptor ¶
func (Operation) Descriptor() protoreflect.EnumDescriptor
func (Operation) EnumDescriptor
deprecated
func (Operation) Number ¶
func (x Operation) Number() protoreflect.EnumNumber
func (Operation) Type ¶
func (Operation) Type() protoreflect.EnumType
type Option ¶
type Option func(*cfg)
Option represents Client option.
func WithCallOptions ¶
func WithCallOptions(opts []grpc.CallOption) Option
WithCallOptions returns Option that configures Client to attach call options to each rpc call.
type PlacementPolicy ¶
type PlacementPolicy struct { // Rules to set number of object replicas and place each one into a named // bucket Replicas []*Replica `protobuf:"bytes,1,rep,name=replicas,proto3" json:"replicas,omitempty"` // Container backup factor controls how deep NeoFS will search for nodes // alternatives to include into container's nodes subset ContainerBackupFactor uint32 `` /* 127-byte string literal not displayed */ // Set of Selectors to form the container's nodes subset Selectors []*Selector `protobuf:"bytes,3,rep,name=selectors,proto3" json:"selectors,omitempty"` // List of named filters to reference in selectors Filters []*Filter `protobuf:"bytes,4,rep,name=filters,proto3" json:"filters,omitempty"` // contains filtered or unexported fields }
Set of rules to select a subset of nodes from `NetworkMap` able to store container's objects. The format is simple enough to transpile from different storage policy definition languages.
func (*PlacementPolicy) Descriptor
deprecated
func (*PlacementPolicy) Descriptor() ([]byte, []int)
Deprecated: Use PlacementPolicy.ProtoReflect.Descriptor instead.
func (*PlacementPolicy) GetContainerBackupFactor ¶
func (x *PlacementPolicy) GetContainerBackupFactor() uint32
func (*PlacementPolicy) GetFilters ¶
func (x *PlacementPolicy) GetFilters() []*Filter
func (*PlacementPolicy) GetReplicas ¶
func (x *PlacementPolicy) GetReplicas() []*Replica
func (*PlacementPolicy) GetSelectors ¶
func (x *PlacementPolicy) GetSelectors() []*Selector
func (*PlacementPolicy) ProtoMessage ¶
func (*PlacementPolicy) ProtoMessage()
func (*PlacementPolicy) ProtoReflect ¶
func (x *PlacementPolicy) ProtoReflect() protoreflect.Message
func (*PlacementPolicy) Reset ¶
func (x *PlacementPolicy) Reset()
func (*PlacementPolicy) SetContainerBackupFactor ¶
func (m *PlacementPolicy) SetContainerBackupFactor(v uint32)
SetContainerBackupFactor of placement policy.
func (*PlacementPolicy) SetFilters ¶
func (m *PlacementPolicy) SetFilters(v []*Filter)
SetFilters of placement policy.
func (*PlacementPolicy) SetReplicas ¶
func (m *PlacementPolicy) SetReplicas(v []*Replica)
SetReplicas of placement policy.
func (*PlacementPolicy) SetSelectors ¶
func (m *PlacementPolicy) SetSelectors(v []*Selector)
SetSelectors of placement policy.
func (*PlacementPolicy) String ¶
func (x *PlacementPolicy) String() string
type Replica ¶
type Replica struct { // How many object replicas to put Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // Named selector bucket to put replicas Selector string `protobuf:"bytes,2,opt,name=selector,proto3" json:"selector,omitempty"` // contains filtered or unexported fields }
Number of object replicas in a set of nodes from the defined selector. If no selector set the root bucket containing all possible nodes will be used by default.
func (*Replica) Descriptor
deprecated
func (*Replica) GetSelector ¶
func (*Replica) ProtoMessage ¶
func (*Replica) ProtoMessage()
func (*Replica) ProtoReflect ¶
func (x *Replica) ProtoReflect() protoreflect.Message
func (*Replica) SetSelector ¶
SetSelector of object replica.
type Selector ¶
type Selector struct { // Selector name to reference in object placement section Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // How many nodes to select from the bucket Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // Selector modifier showing how to form a bucket Clause Clause `protobuf:"varint,3,opt,name=clause,proto3,enum=neo.fs.v2.netmap.Clause" json:"clause,omitempty"` // Attribute bucket to select from Attribute string `protobuf:"bytes,4,opt,name=attribute,proto3" json:"attribute,omitempty"` // Filter reference to select from Filter string `protobuf:"bytes,5,opt,name=filter,proto3" json:"filter,omitempty"` // contains filtered or unexported fields }
Selector chooses a number of nodes from the bucket taking the nearest nodes to the provided `ContainerID` by hash distance.
func (*Selector) Descriptor
deprecated
func (*Selector) GetAttribute ¶
func (*Selector) ProtoMessage ¶
func (*Selector) ProtoMessage()
func (*Selector) ProtoReflect ¶
func (x *Selector) ProtoReflect() protoreflect.Message
func (*Selector) SetAttribute ¶
SetAttribute of nodes of placement selector.
type UnimplementedNetmapServiceServer ¶
type UnimplementedNetmapServiceServer struct { }
UnimplementedNetmapServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedNetmapServiceServer) LocalNodeInfo ¶
func (*UnimplementedNetmapServiceServer) LocalNodeInfo(context.Context, *LocalNodeInfoRequest) (*LocalNodeInfoResponse, error)