shardpb

package
v0.0.27 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package shardpb contains the protobuf-generated code for the internal cluster communication

Index

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) Descriptor() ([]byte, []int)

Deprecated: Use WireNodes.ProtoReflect.Descriptor instead.

func (*WireNodes) GetNodeId

func (x *WireNodes) GetNodeId() int32

func (*WireNodes) GetNodeName

func (x *WireNodes) GetNodeName() string

func (*WireNodes) GetWorkerId

func (x *WireNodes) GetWorkerId() int32

func (*WireNodes) ProtoMessage

func (*WireNodes) ProtoMessage()

func (*WireNodes) ProtoReflect

func (x *WireNodes) ProtoReflect() protoreflect.Message

func (*WireNodes) Reset

func (x *WireNodes) Reset()

func (*WireNodes) String

func (x *WireNodes) String() string

type WireShard

type WireShard struct {
	Id     int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,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) Descriptor() ([]byte, []int)

Deprecated: Use WireShard.ProtoReflect.Descriptor instead.

func (*WireShard) GetId

func (x *WireShard) GetId() int32

func (*WireShard) GetNodeId

func (x *WireShard) GetNodeId() int32

func (*WireShard) ProtoMessage

func (*WireShard) ProtoMessage()

func (*WireShard) ProtoReflect

func (x *WireShard) ProtoReflect() protoreflect.Message

func (*WireShard) Reset

func (x *WireShard) Reset()

func (*WireShard) String

func (x *WireShard) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL