Documentation ¶
Index ¶
- func AttributeToGRPCMessage(a *Attribute) *netmap.NodeInfo_Attribute
- func ClauseToGRPCMessage(n Clause) netmap.Clause
- func FilterToGRPCMessage(f *Filter) *netmap.Filter
- func LocalNodeInfoRequestBodyToGRPCMessage(r *LocalNodeInfoRequestBody) *netmap.LocalNodeInfoRequest_Body
- func LocalNodeInfoRequestToGRPCMessage(r *LocalNodeInfoRequest) *netmap.LocalNodeInfoRequest
- func LocalNodeInfoResponseBodyToGRPCMessage(r *LocalNodeInfoResponseBody) *netmap.LocalNodeInfoResponse_Body
- func LocalNodeInfoResponseToGRPCMessage(r *LocalNodeInfoResponse) *netmap.LocalNodeInfoResponse
- func NodeInfoToGRPCMessage(n *NodeInfo) *netmap.NodeInfo
- func NodeStateToGRPCMessage(n NodeState) netmap.NodeInfo_State
- func OperationToGRPCMessage(n Operation) netmap.Operation
- func PlacementPolicyToGRPCMessage(p *PlacementPolicy) *netmap.PlacementPolicy
- func ReplicaToGRPCMessage(r *Replica) *netmap.Replica
- func SelectorToGRPCMessage(s *Selector) *netmap.Selector
- type Attribute
- func (a *Attribute) GetKey() string
- func (a *Attribute) GetParents() []string
- func (a *Attribute) GetValue() string
- func (a *Attribute) MarshalJSON() ([]byte, error)
- func (a *Attribute) SetKey(v string)
- func (a *Attribute) SetParents(parent []string)
- func (a *Attribute) SetValue(v string)
- func (a *Attribute) StableMarshal(buf []byte) ([]byte, error)
- func (a *Attribute) StableSize() (size int)
- func (a *Attribute) Unmarshal(data []byte) error
- func (a *Attribute) UnmarshalJSON(data []byte) error
- type Clause
- type Client
- type Filter
- func (f *Filter) GetFilters() []*Filter
- func (f *Filter) GetKey() string
- func (f *Filter) GetName() string
- func (f *Filter) GetOp() Operation
- func (f *Filter) GetValue() string
- func (f *Filter) MarshalJSON() ([]byte, error)
- func (f *Filter) SetFilters(filters []*Filter)
- func (f *Filter) SetKey(key string)
- func (f *Filter) SetName(name string)
- func (f *Filter) SetOp(op Operation)
- func (f *Filter) SetValue(value string)
- func (f *Filter) StableMarshal(buf []byte) ([]byte, error)
- func (f *Filter) StableSize() (size int)
- func (f *Filter) Unmarshal(data []byte) error
- func (f *Filter) UnmarshalJSON(data []byte) error
- type LocalNodeInfoRequest
- func (l *LocalNodeInfoRequest) GetBody() *LocalNodeInfoRequestBody
- func (l *LocalNodeInfoRequest) GetMetaHeader() *session.RequestMetaHeader
- func (l *LocalNodeInfoRequest) GetVerificationHeader() *session.RequestVerificationHeader
- func (l *LocalNodeInfoRequest) SetBody(body *LocalNodeInfoRequestBody)
- func (l *LocalNodeInfoRequest) SetMetaHeader(metaHeader *session.RequestMetaHeader)
- func (l *LocalNodeInfoRequest) SetVerificationHeader(verifyHeader *session.RequestVerificationHeader)
- type LocalNodeInfoRequestBody
- type LocalNodeInfoResponse
- func (l *LocalNodeInfoResponse) GetBody() *LocalNodeInfoResponseBody
- func (l *LocalNodeInfoResponse) GetMetaHeader() *session.ResponseMetaHeader
- func (l *LocalNodeInfoResponse) GetVerificationHeader() *session.ResponseVerificationHeader
- func (l *LocalNodeInfoResponse) SetBody(body *LocalNodeInfoResponseBody)
- func (l *LocalNodeInfoResponse) SetMetaHeader(metaHeader *session.ResponseMetaHeader)
- func (l *LocalNodeInfoResponse) SetVerificationHeader(verifyHeader *session.ResponseVerificationHeader)
- type LocalNodeInfoResponseBody
- func (l *LocalNodeInfoResponseBody) GetNodeInfo() *NodeInfo
- func (l *LocalNodeInfoResponseBody) GetVersion() *refs.Version
- func (l *LocalNodeInfoResponseBody) SetNodeInfo(nodeInfo *NodeInfo)
- func (l *LocalNodeInfoResponseBody) SetVersion(version *refs.Version)
- func (l *LocalNodeInfoResponseBody) StableMarshal(buf []byte) ([]byte, error)
- func (l *LocalNodeInfoResponseBody) StableSize() (size int)
- type NodeInfo
- func (ni *NodeInfo) GetAddress() string
- func (ni *NodeInfo) GetAttributes() []*Attribute
- func (ni *NodeInfo) GetPublicKey() []byte
- func (ni *NodeInfo) GetState() NodeState
- func (ni *NodeInfo) MarshalJSON() ([]byte, error)
- func (ni *NodeInfo) SetAddress(v string)
- func (ni *NodeInfo) SetAttributes(v []*Attribute)
- func (ni *NodeInfo) SetPublicKey(v []byte)
- func (ni *NodeInfo) SetState(state NodeState)
- func (ni *NodeInfo) StableMarshal(buf []byte) ([]byte, error)
- func (ni *NodeInfo) StableSize() (size int)
- func (ni *NodeInfo) Unmarshal(data []byte) error
- func (ni *NodeInfo) UnmarshalJSON(data []byte) error
- type NodeState
- type Operation
- type Option
- type PlacementPolicy
- func (p *PlacementPolicy) GetContainerBackupFactor() uint32
- func (p *PlacementPolicy) GetFilters() []*Filter
- func (p *PlacementPolicy) GetReplicas() []*Replica
- func (p *PlacementPolicy) GetSelectors() []*Selector
- func (p *PlacementPolicy) MarshalJSON() ([]byte, error)
- func (p *PlacementPolicy) SetContainerBackupFactor(backupFactor uint32)
- func (p *PlacementPolicy) SetFilters(filters []*Filter)
- func (p *PlacementPolicy) SetReplicas(replicas []*Replica)
- func (p *PlacementPolicy) SetSelectors(selectors []*Selector)
- func (p *PlacementPolicy) StableMarshal(buf []byte) ([]byte, error)
- func (p *PlacementPolicy) StableSize() (size int)
- func (p *PlacementPolicy) Unmarshal(data []byte) error
- func (p *PlacementPolicy) UnmarshalJSON(data []byte) error
- type Replica
- func (r *Replica) GetCount() uint32
- func (r *Replica) GetSelector() string
- func (r *Replica) MarshalJSON() ([]byte, error)
- func (r *Replica) SetCount(count uint32)
- func (r *Replica) SetSelector(selector string)
- func (r *Replica) StableMarshal(buf []byte) ([]byte, error)
- func (r *Replica) StableSize() (size int)
- func (r *Replica) Unmarshal(data []byte) error
- func (r *Replica) UnmarshalJSON(data []byte) error
- type Selector
- func (s *Selector) GetAttribute() string
- func (s *Selector) GetClause() Clause
- func (s *Selector) GetCount() uint32
- func (s *Selector) GetFilter() string
- func (s *Selector) GetName() string
- func (s *Selector) MarshalJSON() ([]byte, error)
- func (s *Selector) SetAttribute(attribute string)
- func (s *Selector) SetClause(clause Clause)
- func (s *Selector) SetCount(count uint32)
- func (s *Selector) SetFilter(filter string)
- func (s *Selector) SetName(name string)
- func (s *Selector) StableMarshal(buf []byte) ([]byte, error)
- func (s *Selector) StableSize() (size int)
- func (s *Selector) Unmarshal(data []byte) error
- func (s *Selector) UnmarshalJSON(data []byte) error
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AttributeToGRPCMessage ¶
func AttributeToGRPCMessage(a *Attribute) *netmap.NodeInfo_Attribute
func ClauseToGRPCMessage ¶
func FilterToGRPCMessage ¶
func LocalNodeInfoRequestBodyToGRPCMessage ¶
func LocalNodeInfoRequestBodyToGRPCMessage(r *LocalNodeInfoRequestBody) *netmap.LocalNodeInfoRequest_Body
func LocalNodeInfoRequestToGRPCMessage ¶
func LocalNodeInfoRequestToGRPCMessage(r *LocalNodeInfoRequest) *netmap.LocalNodeInfoRequest
func LocalNodeInfoResponseBodyToGRPCMessage ¶
func LocalNodeInfoResponseBodyToGRPCMessage(r *LocalNodeInfoResponseBody) *netmap.LocalNodeInfoResponse_Body
func LocalNodeInfoResponseToGRPCMessage ¶
func LocalNodeInfoResponseToGRPCMessage(r *LocalNodeInfoResponse) *netmap.LocalNodeInfoResponse
func NodeInfoToGRPCMessage ¶
func NodeStateToGRPCMessage ¶
func NodeStateToGRPCMessage(n NodeState) netmap.NodeInfo_State
func OperationToGRPCMessage ¶
func PlacementPolicyToGRPCMessage ¶
func PlacementPolicyToGRPCMessage(p *PlacementPolicy) *netmap.PlacementPolicy
func ReplicaToGRPCMessage ¶
func SelectorToGRPCMessage ¶
Types ¶
type Attribute ¶
type Attribute struct {
// contains filtered or unexported fields
}
Attribute of storage node.
func AttributeFromGRPCMessage ¶
func AttributeFromGRPCMessage(m *netmap.NodeInfo_Attribute) *Attribute
func (*Attribute) GetParents ¶
func (*Attribute) MarshalJSON ¶
func (*Attribute) SetParents ¶
func (*Attribute) StableSize ¶
func (*Attribute) UnmarshalJSON ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents universal netmap transport client.
func (*Client) LocalNodeInfo ¶
func (c *Client) LocalNodeInfo(ctx context.Context, req *LocalNodeInfoRequest) (*LocalNodeInfoResponse, error)
LocalNodeInfo sends LocalNodeInfoRequest over the network.
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
func FilterFromGRPCMessage ¶
func (*Filter) GetFilters ¶
func (*Filter) MarshalJSON ¶
func (*Filter) SetFilters ¶
func (*Filter) StableSize ¶
func (*Filter) UnmarshalJSON ¶
type LocalNodeInfoRequest ¶
type LocalNodeInfoRequest struct {
// contains filtered or unexported fields
}
func LocalNodeInfoRequestFromGRPCMessage ¶
func LocalNodeInfoRequestFromGRPCMessage(m *netmap.LocalNodeInfoRequest) *LocalNodeInfoRequest
func (*LocalNodeInfoRequest) GetBody ¶
func (l *LocalNodeInfoRequest) GetBody() *LocalNodeInfoRequestBody
func (*LocalNodeInfoRequest) GetMetaHeader ¶
func (l *LocalNodeInfoRequest) GetMetaHeader() *session.RequestMetaHeader
func (*LocalNodeInfoRequest) GetVerificationHeader ¶
func (l *LocalNodeInfoRequest) GetVerificationHeader() *session.RequestVerificationHeader
func (*LocalNodeInfoRequest) SetBody ¶
func (l *LocalNodeInfoRequest) SetBody(body *LocalNodeInfoRequestBody)
func (*LocalNodeInfoRequest) SetMetaHeader ¶
func (l *LocalNodeInfoRequest) SetMetaHeader(metaHeader *session.RequestMetaHeader)
func (*LocalNodeInfoRequest) SetVerificationHeader ¶
func (l *LocalNodeInfoRequest) SetVerificationHeader(verifyHeader *session.RequestVerificationHeader)
type LocalNodeInfoRequestBody ¶
type LocalNodeInfoRequestBody struct{}
func LocalNodeInfoRequestBodyFromGRPCMessage ¶
func LocalNodeInfoRequestBodyFromGRPCMessage(m *netmap.LocalNodeInfoRequest_Body) *LocalNodeInfoRequestBody
func (*LocalNodeInfoRequestBody) StableMarshal ¶
func (l *LocalNodeInfoRequestBody) StableMarshal(buf []byte) ([]byte, error)
func (*LocalNodeInfoRequestBody) StableSize ¶
func (l *LocalNodeInfoRequestBody) StableSize() (size int)
type LocalNodeInfoResponse ¶
type LocalNodeInfoResponse struct {
// contains filtered or unexported fields
}
func LocalNodeInfoResponseFromGRPCMessage ¶
func LocalNodeInfoResponseFromGRPCMessage(m *netmap.LocalNodeInfoResponse) *LocalNodeInfoResponse
func (*LocalNodeInfoResponse) GetBody ¶
func (l *LocalNodeInfoResponse) GetBody() *LocalNodeInfoResponseBody
func (*LocalNodeInfoResponse) GetMetaHeader ¶
func (l *LocalNodeInfoResponse) GetMetaHeader() *session.ResponseMetaHeader
func (*LocalNodeInfoResponse) GetVerificationHeader ¶
func (l *LocalNodeInfoResponse) GetVerificationHeader() *session.ResponseVerificationHeader
func (*LocalNodeInfoResponse) SetBody ¶
func (l *LocalNodeInfoResponse) SetBody(body *LocalNodeInfoResponseBody)
func (*LocalNodeInfoResponse) SetMetaHeader ¶
func (l *LocalNodeInfoResponse) SetMetaHeader(metaHeader *session.ResponseMetaHeader)
func (*LocalNodeInfoResponse) SetVerificationHeader ¶
func (l *LocalNodeInfoResponse) SetVerificationHeader(verifyHeader *session.ResponseVerificationHeader)
type LocalNodeInfoResponseBody ¶
type LocalNodeInfoResponseBody struct {
// contains filtered or unexported fields
}
func LocalNodeInfoResponseBodyFromGRPCMessage ¶
func LocalNodeInfoResponseBodyFromGRPCMessage(m *netmap.LocalNodeInfoResponse_Body) *LocalNodeInfoResponseBody
func (*LocalNodeInfoResponseBody) GetNodeInfo ¶
func (l *LocalNodeInfoResponseBody) GetNodeInfo() *NodeInfo
func (*LocalNodeInfoResponseBody) GetVersion ¶
func (l *LocalNodeInfoResponseBody) GetVersion() *refs.Version
func (*LocalNodeInfoResponseBody) SetNodeInfo ¶
func (l *LocalNodeInfoResponseBody) SetNodeInfo(nodeInfo *NodeInfo)
func (*LocalNodeInfoResponseBody) SetVersion ¶
func (l *LocalNodeInfoResponseBody) SetVersion(version *refs.Version)
func (*LocalNodeInfoResponseBody) StableMarshal ¶
func (l *LocalNodeInfoResponseBody) StableMarshal(buf []byte) ([]byte, error)
func (*LocalNodeInfoResponseBody) StableSize ¶
func (l *LocalNodeInfoResponseBody) StableSize() (size int)
type NodeInfo ¶
type NodeInfo struct {
// contains filtered or unexported fields
}
NodeInfo of storage node.
func NodeInfoFromGRPCMessage ¶
func (*NodeInfo) GetAddress ¶
func (*NodeInfo) GetAttributes ¶
func (*NodeInfo) GetPublicKey ¶
func (*NodeInfo) MarshalJSON ¶
func (*NodeInfo) SetAddress ¶
func (*NodeInfo) SetAttributes ¶
func (*NodeInfo) SetPublicKey ¶
func (*NodeInfo) StableSize ¶
func (*NodeInfo) UnmarshalJSON ¶
type NodeState ¶
type NodeState uint32
NodeState of storage node.
func NodeStateFromRPCMessage ¶
func NodeStateFromRPCMessage(n netmap.NodeInfo_State) NodeState
type Option ¶
type Option func(*cfg)
Option represents Client option.
func WithGRPCCallOpts ¶
func WithGRPCCallOpts(v []grpc.CallOption) Option
WithGRPCServiceClient sets GRPC specific call options.
func WithGRPCClient ¶
WithGRPCServiceClient sets existing GRPC client.
func WithGRPCClientOpts ¶
WithGRPCServiceClient sets GRPC specific client options.
func WithGRPCServiceClient ¶
func WithGRPCServiceClient(v netmap.NetmapServiceClient) Option
WithGRPCServiceClient sets existing service client.
func WithGlobalOpts ¶
WithGlobalOpts sets global client options to client.
type PlacementPolicy ¶
type PlacementPolicy struct {
// contains filtered or unexported fields
}
func PlacementPolicyFromGRPCMessage ¶
func PlacementPolicyFromGRPCMessage(m *netmap.PlacementPolicy) *PlacementPolicy
func (*PlacementPolicy) GetContainerBackupFactor ¶
func (p *PlacementPolicy) GetContainerBackupFactor() uint32
func (*PlacementPolicy) GetFilters ¶
func (p *PlacementPolicy) GetFilters() []*Filter
func (*PlacementPolicy) GetReplicas ¶
func (p *PlacementPolicy) GetReplicas() []*Replica
func (*PlacementPolicy) GetSelectors ¶
func (p *PlacementPolicy) GetSelectors() []*Selector
func (*PlacementPolicy) MarshalJSON ¶
func (p *PlacementPolicy) MarshalJSON() ([]byte, error)
func (*PlacementPolicy) SetContainerBackupFactor ¶
func (p *PlacementPolicy) SetContainerBackupFactor(backupFactor uint32)
func (*PlacementPolicy) SetFilters ¶
func (p *PlacementPolicy) SetFilters(filters []*Filter)
func (*PlacementPolicy) SetReplicas ¶
func (p *PlacementPolicy) SetReplicas(replicas []*Replica)
func (*PlacementPolicy) SetSelectors ¶
func (p *PlacementPolicy) SetSelectors(selectors []*Selector)
func (*PlacementPolicy) StableMarshal ¶
func (p *PlacementPolicy) StableMarshal(buf []byte) ([]byte, error)
func (*PlacementPolicy) StableSize ¶
func (p *PlacementPolicy) StableSize() (size int)
func (*PlacementPolicy) Unmarshal ¶
func (p *PlacementPolicy) Unmarshal(data []byte) error
func (*PlacementPolicy) UnmarshalJSON ¶
func (p *PlacementPolicy) UnmarshalJSON(data []byte) error
type Replica ¶
type Replica struct {
// contains filtered or unexported fields
}
func ReplicaFromGRPCMessage ¶
func (*Replica) GetSelector ¶
func (*Replica) MarshalJSON ¶
func (*Replica) SetSelector ¶
func (*Replica) StableSize ¶
func (*Replica) UnmarshalJSON ¶
type Selector ¶
type Selector struct {
// contains filtered or unexported fields
}
func SelectorFromGRPCMessage ¶
func (*Selector) GetAttribute ¶
func (*Selector) MarshalJSON ¶
func (*Selector) SetAttribute ¶
func (*Selector) StableSize ¶
func (*Selector) UnmarshalJSON ¶
type Service ¶
type Service interface {
LocalNodeInfo(ctx context.Context, request *LocalNodeInfoRequest) (*LocalNodeInfoResponse, error)
}
Click to show internal directories.
Click to hide internal directories.