clusterpb

package
v0.0.0-...-29cb0c6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NodeState_name = map[int32]string{
		0: "ONLINE",
		1: "OFFLINE",
	}
	NodeState_value = map[string]int32{
		"ONLINE":  0,
		"OFFLINE": 1,
	}
)

Enum value maps for NodeState.

View Source
var (
	ShardRole_name = map[int32]string{
		0: "LEADER",
		1: "FOLLOWER",
		2: "PENDING_LEADER",
		3: "PENDING_FOLLOWER",
	}
	ShardRole_value = map[string]int32{
		"LEADER":           0,
		"FOLLOWER":         1,
		"PENDING_LEADER":   2,
		"PENDING_FOLLOWER": 3,
	}
)

Enum value maps for ShardRole.

View Source
var (
	ClusterTopology_ClusterState_name = map[int32]string{
		0: "EMPTY",
		1: "PREPARE_REBALANCE",
		2: "AWAITING_CLOSE",
		3: "AWAITING_OPEN",
		4: "STABLE",
	}
	ClusterTopology_ClusterState_value = map[string]int32{
		"EMPTY":             0,
		"PREPARE_REBALANCE": 1,
		"AWAITING_CLOSE":    2,
		"AWAITING_OPEN":     3,
		"STABLE":            4,
	}
)

Enum value maps for ClusterTopology_ClusterState.

View Source
var File_cluster_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ChangeShards

type ChangeShards struct {
	CloseShards []*Shard `protobuf:"bytes,1,rep,name=close_shards,json=closeShards,proto3" json:"close_shards,omitempty"`
	OpenShards  []*Shard `protobuf:"bytes,2,rep,name=open_shards,json=openShards,proto3" json:"open_shards,omitempty"`
	// contains filtered or unexported fields
}

func (*ChangeShards) Descriptor deprecated

func (*ChangeShards) Descriptor() ([]byte, []int)

Deprecated: Use ChangeShards.ProtoReflect.Descriptor instead.

func (*ChangeShards) GetCloseShards

func (x *ChangeShards) GetCloseShards() []*Shard

func (*ChangeShards) GetOpenShards

func (x *ChangeShards) GetOpenShards() []*Shard

func (*ChangeShards) ProtoMessage

func (*ChangeShards) ProtoMessage()

func (*ChangeShards) ProtoReflect

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

func (*ChangeShards) Reset

func (x *ChangeShards) Reset()

func (*ChangeShards) String

func (x *ChangeShards) String() string

type Cluster

type Cluster struct {
	Id           uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name         string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	MinNodeCount uint32 `protobuf:"varint,3,opt,name=min_node_count,json=minNodeCount,proto3" json:"min_node_count,omitempty"`
	// the number of shard replication
	ReplicationFactor uint32 `protobuf:"varint,4,opt,name=replication_factor,json=replicationFactor,proto3" json:"replication_factor,omitempty"`
	ShardTotal        uint32 `protobuf:"varint,5,opt,name=shard_total,json=shardTotal,proto3" json:"shard_total,omitempty"`
	CreatedAt         uint64 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

example: cluster 1: v1/cluster/1 -> ceresmeta.Cluster cluster 2: v1/cluster/2 -> ceresmeta.Cluster

func (*Cluster) Descriptor deprecated

func (*Cluster) Descriptor() ([]byte, []int)

Deprecated: Use Cluster.ProtoReflect.Descriptor instead.

func (*Cluster) GetCreatedAt

func (x *Cluster) GetCreatedAt() uint64

func (*Cluster) GetId

func (x *Cluster) GetId() uint32

func (*Cluster) GetMinNodeCount

func (x *Cluster) GetMinNodeCount() uint32

func (*Cluster) GetName

func (x *Cluster) GetName() string

func (*Cluster) GetReplicationFactor

func (x *Cluster) GetReplicationFactor() uint32

func (*Cluster) GetShardTotal

func (x *Cluster) GetShardTotal() uint32

func (*Cluster) ProtoMessage

func (*Cluster) ProtoMessage()

func (*Cluster) ProtoReflect

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

func (*Cluster) Reset

func (x *Cluster) Reset()

func (*Cluster) String

func (x *Cluster) String() string

type ClusterTopology

type ClusterTopology struct {
	ClusterId uint32                       `protobuf:"varint,1,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	Version   uint64                       `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	State     ClusterTopology_ClusterState `protobuf:"varint,3,opt,name=state,proto3,enum=cluster.ClusterTopology_ClusterState" json:"state,omitempty"`
	ShardView []*Shard                     `protobuf:"bytes,4,rep,name=shard_view,json=shardView,proto3" json:"shard_view,omitempty"`
	// cluster view's changed cause
	Cause            string                   `protobuf:"bytes,5,opt,name=cause,proto3" json:"cause,omitempty"`
	CreatedAt        uint64                   `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	ChangeNodeShards map[string]*ChangeShards `` /* 199-byte string literal not displayed */
	// contains filtered or unexported fields
}

example: cluster 1: v1/cluster/1/topo/latest_version -> 99

v1/cluster/1/topo/99 -> ceresmeta.ClusterTopology
v1/cluster/1/topo/98 -> ceresmeta.ClusterTopology

func (*ClusterTopology) Descriptor deprecated

func (*ClusterTopology) Descriptor() ([]byte, []int)

Deprecated: Use ClusterTopology.ProtoReflect.Descriptor instead.

func (*ClusterTopology) GetCause

func (x *ClusterTopology) GetCause() string

func (*ClusterTopology) GetChangeNodeShards

func (x *ClusterTopology) GetChangeNodeShards() map[string]*ChangeShards

func (*ClusterTopology) GetClusterId

func (x *ClusterTopology) GetClusterId() uint32

func (*ClusterTopology) GetCreatedAt

func (x *ClusterTopology) GetCreatedAt() uint64

func (*ClusterTopology) GetShardView

func (x *ClusterTopology) GetShardView() []*Shard

func (*ClusterTopology) GetState

func (*ClusterTopology) GetVersion

func (x *ClusterTopology) GetVersion() uint64

func (*ClusterTopology) ProtoMessage

func (*ClusterTopology) ProtoMessage()

func (*ClusterTopology) ProtoReflect

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

func (*ClusterTopology) Reset

func (x *ClusterTopology) Reset()

func (*ClusterTopology) String

func (x *ClusterTopology) String() string

type ClusterTopology_ClusterState

type ClusterTopology_ClusterState int32
const (
	ClusterTopology_EMPTY             ClusterTopology_ClusterState = 0
	ClusterTopology_PREPARE_REBALANCE ClusterTopology_ClusterState = 1
	ClusterTopology_AWAITING_CLOSE    ClusterTopology_ClusterState = 2
	ClusterTopology_AWAITING_OPEN     ClusterTopology_ClusterState = 3
	ClusterTopology_STABLE            ClusterTopology_ClusterState = 4
)

func (ClusterTopology_ClusterState) Descriptor

func (ClusterTopology_ClusterState) Enum

func (ClusterTopology_ClusterState) EnumDescriptor deprecated

func (ClusterTopology_ClusterState) EnumDescriptor() ([]byte, []int)

Deprecated: Use ClusterTopology_ClusterState.Descriptor instead.

func (ClusterTopology_ClusterState) Number

func (ClusterTopology_ClusterState) String

func (ClusterTopology_ClusterState) Type

type HeartbeatSamplingInfo

type HeartbeatSamplingInfo struct {
	Threshold                      float64 `protobuf:"fixed64,1,opt,name=threshold,proto3" json:"threshold,omitempty"`
	MinStdDeviationMillis          float64 `` /* 130-byte string literal not displayed */
	AcceptableHeartbeatPauseMillis uint64  `` /* 156-byte string literal not displayed */
	FirstHeartbeatEstimateMillis   uint64  `` /* 150-byte string literal not displayed */
	MaxSampleSize                  uint32  `protobuf:"varint,5,opt,name=max_sample_size,json=maxSampleSize,proto3" json:"max_sample_size,omitempty"`
	Intervals                      []int64 `protobuf:"varint,6,rep,packed,name=intervals,proto3" json:"intervals,omitempty"`
	IntervalSum                    uint64  `protobuf:"varint,7,opt,name=interval_sum,json=intervalSum,proto3" json:"interval_sum,omitempty"`
	SquaredIntervalSum             uint64  `protobuf:"varint,8,opt,name=squared_interval_sum,json=squaredIntervalSum,proto3" json:"squared_interval_sum,omitempty"`
	LastTimestampMillis            uint64  `protobuf:"varint,9,opt,name=last_timestamp_millis,json=lastTimestampMillis,proto3" json:"last_timestamp_millis,omitempty"`
	// contains filtered or unexported fields
}

func (*HeartbeatSamplingInfo) Descriptor deprecated

func (*HeartbeatSamplingInfo) Descriptor() ([]byte, []int)

Deprecated: Use HeartbeatSamplingInfo.ProtoReflect.Descriptor instead.

func (*HeartbeatSamplingInfo) GetAcceptableHeartbeatPauseMillis

func (x *HeartbeatSamplingInfo) GetAcceptableHeartbeatPauseMillis() uint64

func (*HeartbeatSamplingInfo) GetFirstHeartbeatEstimateMillis

func (x *HeartbeatSamplingInfo) GetFirstHeartbeatEstimateMillis() uint64

func (*HeartbeatSamplingInfo) GetIntervalSum

func (x *HeartbeatSamplingInfo) GetIntervalSum() uint64

func (*HeartbeatSamplingInfo) GetIntervals

func (x *HeartbeatSamplingInfo) GetIntervals() []int64

func (*HeartbeatSamplingInfo) GetLastTimestampMillis

func (x *HeartbeatSamplingInfo) GetLastTimestampMillis() uint64

func (*HeartbeatSamplingInfo) GetMaxSampleSize

func (x *HeartbeatSamplingInfo) GetMaxSampleSize() uint32

func (*HeartbeatSamplingInfo) GetMinStdDeviationMillis

func (x *HeartbeatSamplingInfo) GetMinStdDeviationMillis() float64

func (*HeartbeatSamplingInfo) GetSquaredIntervalSum

func (x *HeartbeatSamplingInfo) GetSquaredIntervalSum() uint64

func (*HeartbeatSamplingInfo) GetThreshold

func (x *HeartbeatSamplingInfo) GetThreshold() float64

func (*HeartbeatSamplingInfo) ProtoMessage

func (*HeartbeatSamplingInfo) ProtoMessage()

func (*HeartbeatSamplingInfo) ProtoReflect

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

func (*HeartbeatSamplingInfo) Reset

func (x *HeartbeatSamplingInfo) Reset()

func (*HeartbeatSamplingInfo) String

func (x *HeartbeatSamplingInfo) String() string

type Node

type Node struct {
	Name                  string                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	NodeStats             *NodeStats             `protobuf:"bytes,2,opt,name=node_stats,json=nodeStats,proto3" json:"node_stats,omitempty"`
	CreateTime            uint64                 `protobuf:"varint,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
	LastTouchTime         uint64                 `protobuf:"varint,4,opt,name=last_touch_time,json=lastTouchTime,proto3" json:"last_touch_time,omitempty"`
	State                 NodeState              `protobuf:"varint,5,opt,name=state,proto3,enum=cluster.NodeState" json:"state,omitempty"`
	HeartbeatSamplingInfo *HeartbeatSamplingInfo `` /* 126-byte string literal not displayed */
	// contains filtered or unexported fields
}

example: cluster 1: v1/cluster/1/node/127.0.0.1:8081 -> value is ceresmeta.Node

v1/cluster/1/node/127.0.0.2:8081 -> value is ceresmeta.Node

func (*Node) Descriptor deprecated

func (*Node) Descriptor() ([]byte, []int)

Deprecated: Use Node.ProtoReflect.Descriptor instead.

func (*Node) GetCreateTime

func (x *Node) GetCreateTime() uint64

func (*Node) GetHeartbeatSamplingInfo

func (x *Node) GetHeartbeatSamplingInfo() *HeartbeatSamplingInfo

func (*Node) GetLastTouchTime

func (x *Node) GetLastTouchTime() uint64

func (*Node) GetName

func (x *Node) GetName() string

func (*Node) GetNodeStats

func (x *Node) GetNodeStats() *NodeStats

func (*Node) GetState

func (x *Node) GetState() NodeState

func (*Node) ProtoMessage

func (*Node) ProtoMessage()

func (*Node) ProtoReflect

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

func (*Node) Reset

func (x *Node) Reset()

func (*Node) String

func (x *Node) String() string

type NodeState

type NodeState int32
const (
	NodeState_ONLINE  NodeState = 0
	NodeState_OFFLINE NodeState = 1
)

func (NodeState) Descriptor

func (NodeState) Descriptor() protoreflect.EnumDescriptor

func (NodeState) Enum

func (x NodeState) Enum() *NodeState

func (NodeState) EnumDescriptor deprecated

func (NodeState) EnumDescriptor() ([]byte, []int)

Deprecated: Use NodeState.Descriptor instead.

func (NodeState) Number

func (x NodeState) Number() protoreflect.EnumNumber

func (NodeState) String

func (x NodeState) String() string

func (NodeState) Type

type NodeStats

type NodeStats struct {
	Lease       uint32 `protobuf:"varint,1,opt,name=lease,proto3" json:"lease,omitempty"`
	Zone        string `protobuf:"bytes,2,opt,name=zone,proto3" json:"zone,omitempty"`
	NodeVersion string `protobuf:"bytes,3,opt,name=node_version,json=nodeVersion,proto3" json:"node_version,omitempty"`
	// contains filtered or unexported fields
}

func (*NodeStats) Descriptor deprecated

func (*NodeStats) Descriptor() ([]byte, []int)

Deprecated: Use NodeStats.ProtoReflect.Descriptor instead.

func (*NodeStats) GetLease

func (x *NodeStats) GetLease() uint32

func (*NodeStats) GetNodeVersion

func (x *NodeStats) GetNodeVersion() string

func (*NodeStats) GetZone

func (x *NodeStats) GetZone() string

func (*NodeStats) ProtoMessage

func (*NodeStats) ProtoMessage()

func (*NodeStats) ProtoReflect

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

func (*NodeStats) Reset

func (x *NodeStats) Reset()

func (*NodeStats) String

func (x *NodeStats) String() string

type Schema

type Schema struct {
	Id        uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ClusterId uint32 `protobuf:"varint,2,opt,name=cluster_id,json=clusterId,proto3" json:"cluster_id,omitempty"`
	Name      string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	CreatedAt uint64 `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

example: cluster 1: v1/cluster/1/schema/1 -> ceresmeta.Schema

v1/cluster/1/schema/2 -> ceresmeta.Schema
v1/cluster/1/schema/3 -> ceresmeta.Schema

func (*Schema) Descriptor deprecated

func (*Schema) Descriptor() ([]byte, []int)

Deprecated: Use Schema.ProtoReflect.Descriptor instead.

func (*Schema) GetClusterId

func (x *Schema) GetClusterId() uint32

func (*Schema) GetCreatedAt

func (x *Schema) GetCreatedAt() uint64

func (*Schema) GetId

func (x *Schema) GetId() uint32

func (*Schema) GetName

func (x *Schema) GetName() string

func (*Schema) ProtoMessage

func (*Schema) ProtoMessage()

func (*Schema) ProtoReflect

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

func (*Schema) Reset

func (x *Schema) Reset()

func (*Schema) String

func (x *Schema) String() string

type Shard

type Shard struct {
	Id        uint32    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	ShardRole ShardRole `protobuf:"varint,2,opt,name=shard_role,json=shardRole,proto3,enum=cluster.ShardRole" json:"shard_role,omitempty"`
	Node      string    `protobuf:"bytes,3,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

func (*Shard) Descriptor deprecated

func (*Shard) Descriptor() ([]byte, []int)

Deprecated: Use Shard.ProtoReflect.Descriptor instead.

func (*Shard) GetId

func (x *Shard) GetId() uint32

func (*Shard) GetNode

func (x *Shard) GetNode() string

func (*Shard) GetShardRole

func (x *Shard) GetShardRole() ShardRole

func (*Shard) ProtoMessage

func (*Shard) ProtoMessage()

func (*Shard) ProtoReflect

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

func (*Shard) Reset

func (x *Shard) Reset()

func (*Shard) String

func (x *Shard) String() string

type ShardRole

type ShardRole int32
const (
	ShardRole_LEADER           ShardRole = 0
	ShardRole_FOLLOWER         ShardRole = 1
	ShardRole_PENDING_LEADER   ShardRole = 2
	ShardRole_PENDING_FOLLOWER ShardRole = 3
)

func (ShardRole) Descriptor

func (ShardRole) Descriptor() protoreflect.EnumDescriptor

func (ShardRole) Enum

func (x ShardRole) Enum() *ShardRole

func (ShardRole) EnumDescriptor deprecated

func (ShardRole) EnumDescriptor() ([]byte, []int)

Deprecated: Use ShardRole.Descriptor instead.

func (ShardRole) Number

func (x ShardRole) Number() protoreflect.EnumNumber

func (ShardRole) String

func (x ShardRole) String() string

func (ShardRole) Type

type ShardTopology

type ShardTopology struct {
	ShardId   uint32   `protobuf:"varint,1,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
	TableIds  []uint64 `protobuf:"varint,2,rep,packed,name=table_ids,json=tableIds,proto3" json:"table_ids,omitempty"`
	Version   uint64   `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
	CreatedAt uint64   `protobuf:"varint,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

example: cluster 1: v1/cluster/1/shard/1/latest_version -> 9

v1/cluster/1/shard/1/9 -> ceresmeta.ShardTopology
v1/cluster/1/shard/1/8 -> ceresmeta.ShardTopology
v1/cluster/1/shard/2/latest_version -> 3
v1/cluster/1/shard/2/3 -> ceresmeta.ShardTopology

func (*ShardTopology) Descriptor deprecated

func (*ShardTopology) Descriptor() ([]byte, []int)

Deprecated: Use ShardTopology.ProtoReflect.Descriptor instead.

func (*ShardTopology) GetCreatedAt

func (x *ShardTopology) GetCreatedAt() uint64

func (*ShardTopology) GetShardId

func (x *ShardTopology) GetShardId() uint32

func (*ShardTopology) GetTableIds

func (x *ShardTopology) GetTableIds() []uint64

func (*ShardTopology) GetVersion

func (x *ShardTopology) GetVersion() uint64

func (*ShardTopology) ProtoMessage

func (*ShardTopology) ProtoMessage()

func (*ShardTopology) ProtoReflect

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

func (*ShardTopology) Reset

func (x *ShardTopology) Reset()

func (*ShardTopology) String

func (x *ShardTopology) String() string

type Table

type Table struct {
	Id        uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	SchemaId  uint32 `protobuf:"varint,3,opt,name=schema_id,json=schemaId,proto3" json:"schema_id,omitempty"`
	ShardId   uint32 `protobuf:"varint,4,opt,name=shard_id,json=shardId,proto3" json:"shard_id,omitempty"`
	Desc      string `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"`
	CreatedAt uint64 `protobuf:"varint,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

example: cluster 1: v1/cluster/1/schema/1/table/1 -> ceresmeta.Table

v1/cluster/1/schema/1/table/2 -> ceresmeta.Table
v1/cluster/1/schema/1/table/3 -> ceresmeta.Table
v1/cluster/1/schema/2/table/4 -> ceresmeta.Table

func (*Table) Descriptor deprecated

func (*Table) Descriptor() ([]byte, []int)

Deprecated: Use Table.ProtoReflect.Descriptor instead.

func (*Table) GetCreatedAt

func (x *Table) GetCreatedAt() uint64

func (*Table) GetDesc

func (x *Table) GetDesc() string

func (*Table) GetId

func (x *Table) GetId() uint64

func (*Table) GetName

func (x *Table) GetName() string

func (*Table) GetSchemaId

func (x *Table) GetSchemaId() uint32

func (*Table) GetShardId

func (x *Table) GetShardId() uint32

func (*Table) ProtoMessage

func (*Table) ProtoMessage()

func (*Table) ProtoReflect

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

func (*Table) Reset

func (x *Table) Reset()

func (*Table) String

func (x *Table) String() string

Jump to

Keyboard shortcuts

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