Documentation ¶
Overview ¶
Package shardpb contains the protobuf-generated code for the internal cluster communication
Index ¶
- Variables
- type ShardDistribution
- func (*ShardDistribution) Descriptor() ([]byte, []int)deprecated
- func (x *ShardDistribution) GetNodes() []*WireNodes
- func (x *ShardDistribution) GetShards() []*WireShard
- func (*ShardDistribution) ProtoMessage()
- func (x *ShardDistribution) ProtoReflect() protoreflect.Message
- func (x *ShardDistribution) Reset()
- func (x *ShardDistribution) String() string
- type WireNodes
- func (*WireNodes) Descriptor() ([]byte, []int)deprecated
- func (x *WireNodes) GetNodeId() int32
- func (x *WireNodes) GetNodeName() string
- func (x *WireNodes) GetWorkerId() int32
- func (*WireNodes) ProtoMessage()
- func (x *WireNodes) ProtoReflect() protoreflect.Message
- func (x *WireNodes) Reset()
- func (x *WireNodes) String() string
- type WireShard
- func (*WireShard) Descriptor() ([]byte, []int)deprecated
- func (x *WireShard) GetId() int32
- func (x *WireShard) GetNodeId() int32
- func (x *WireShard) GetWeight() int32
- func (*WireShard) ProtoMessage()
- func (x *WireShard) ProtoReflect() protoreflect.Message
- func (x *WireShard) Reset()
- func (x *WireShard) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_sharding_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type ShardDistribution ¶
type ShardDistribution struct { Nodes []*WireNodes `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"` Shards []*WireShard `protobuf:"bytes,2,rep,name=shards,proto3" json:"shards,omitempty"` // contains filtered or unexported fields }
Shard distribution with a list of nodes and their assigned ID and the shards as set by the leader node.
func (*ShardDistribution) Descriptor
deprecated
func (*ShardDistribution) Descriptor() ([]byte, []int)
Deprecated: Use ShardDistribution.ProtoReflect.Descriptor instead.
func (*ShardDistribution) GetNodes ¶
func (x *ShardDistribution) GetNodes() []*WireNodes
func (*ShardDistribution) GetShards ¶
func (x *ShardDistribution) GetShards() []*WireShard
func (*ShardDistribution) ProtoMessage ¶
func (*ShardDistribution) ProtoMessage()
func (*ShardDistribution) ProtoReflect ¶
func (x *ShardDistribution) ProtoReflect() protoreflect.Message
func (*ShardDistribution) Reset ¶
func (x *ShardDistribution) Reset()
func (*ShardDistribution) String ¶
func (x *ShardDistribution) String() string
type WireNodes ¶
type WireNodes struct { NodeId int32 `protobuf:"varint,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty"` WorkerId int32 `protobuf:"varint,3,opt,name=worker_id,json=workerId,proto3" json:"worker_id,omitempty"` // contains filtered or unexported fields }
The node ID and name list. This maps the nodes to each shard. The node is responsible for looking up the shards itself. The worker ID is assigned by the leader node. The worker ID might change each time the cluster reshards.
func (*WireNodes) Descriptor
deprecated
func (*WireNodes) GetNodeName ¶
func (*WireNodes) GetWorkerId ¶
func (*WireNodes) ProtoMessage ¶
func (*WireNodes) ProtoMessage()
func (*WireNodes) ProtoReflect ¶
func (x *WireNodes) ProtoReflect() protoreflect.Message
type WireShard ¶
type WireShard struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Weight int32 `protobuf:"varint,2,opt,name=weight,proto3" json:"weight,omitempty"` NodeId int32 `protobuf:"varint,3,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` // contains filtered or unexported fields }
A single shard with an ID, a weight and the node ID for the responsible node.
func (*WireShard) Descriptor
deprecated
func (*WireShard) ProtoMessage ¶
func (*WireShard) ProtoMessage()
func (*WireShard) ProtoReflect ¶
func (x *WireShard) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.