topodata

package
v2.0.0-alpha4+incompat... Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2015 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package topodata is a generated protocol buffer package.

It is generated from these files:

topodata.proto

It has these top-level messages:

KeyRange
TabletAlias
Tablet
Shard
Keyspace
ShardReplication
EndPoint
EndPoints
SrvShard
ShardReference
SrvKeyspace

Index

Constants

This section is empty.

Variables

View Source
var KeyspaceIdType_name = map[int32]string{
	0: "UNSET",
	1: "UINT64",
	2: "BYTES",
}
View Source
var KeyspaceIdType_value = map[string]int32{
	"UNSET":  0,
	"UINT64": 1,
	"BYTES":  2,
}
View Source
var TabletType_name = map[int32]string{
	0: "UNKNOWN",
	1: "IDLE",
	2: "MASTER",
	3: "REPLICA",
	4: "RDONLY",

	5:  "SPARE",
	6:  "EXPERIMENTAL",
	7:  "SCHEMA_UPGRADE",
	8:  "BACKUP",
	9:  "RESTORE",
	10: "WORKER",
	11: "SCRAP",
}
View Source
var TabletType_value = map[string]int32{
	"UNKNOWN":        0,
	"IDLE":           1,
	"MASTER":         2,
	"REPLICA":        3,
	"RDONLY":         4,
	"BATCH":          4,
	"SPARE":          5,
	"EXPERIMENTAL":   6,
	"SCHEMA_UPGRADE": 7,
	"BACKUP":         8,
	"RESTORE":        9,
	"WORKER":         10,
	"SCRAP":          11,
}

Functions

This section is empty.

Types

type EndPoint

type EndPoint struct {
	// The uid of the tablet.
	Uid uint32 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"`
	// The host the tablet is running on (FQDN).
	Host string `protobuf:"bytes,2,opt,name=host" json:"host,omitempty"`
	// The ports opened for service.
	PortMap map[string]int32 `` /* 137-byte string literal not displayed */
	// The health entries.
	HealthMap map[string]string `` /* 140-byte string literal not displayed */
}

EndPoint corresponds to a single tablet.

func (*EndPoint) GetHealthMap

func (m *EndPoint) GetHealthMap() map[string]string

func (*EndPoint) GetPortMap

func (m *EndPoint) GetPortMap() map[string]int32

func (*EndPoint) ProtoMessage

func (*EndPoint) ProtoMessage()

func (*EndPoint) Reset

func (m *EndPoint) Reset()

func (*EndPoint) String

func (m *EndPoint) String() string

type EndPoints

type EndPoints struct {
	Entries []*EndPoint `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}

EndPoints corresponds to a list of tablets.

func (*EndPoints) GetEntries

func (m *EndPoints) GetEntries() []*EndPoint

func (*EndPoints) ProtoMessage

func (*EndPoints) ProtoMessage()

func (*EndPoints) Reset

func (m *EndPoints) Reset()

func (*EndPoints) String

func (m *EndPoints) String() string

type KeyRange

type KeyRange struct {
	Start []byte `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
	End   []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
}

KeyRange describes a range of sharding keys, when range-based sharding is used.

func (*KeyRange) ProtoMessage

func (*KeyRange) ProtoMessage()

func (*KeyRange) Reset

func (m *KeyRange) Reset()

func (*KeyRange) String

func (m *KeyRange) String() string

type Keyspace

type Keyspace struct {
	// name of the column used for sharding
	// empty if the keyspace is not sharded
	ShardingColumnName string `protobuf:"bytes,1,opt,name=sharding_column_name" json:"sharding_column_name,omitempty"`
	// type of the column used for sharding
	// KIT_UNSET if the keyspace is not sharded
	ShardingColumnType KeyspaceIdType `protobuf:"varint,2,opt,name=sharding_column_type,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"`
	// SplitShardCount stores the number of jobs to run to be sure to
	// always have at most one job per shard (used during resharding).
	SplitShardCount int32 `protobuf:"varint,3,opt,name=split_shard_count" json:"split_shard_count,omitempty"`
	// ServedFrom will redirect the appropriate traffic to
	// another keyspace.
	ServedFroms []*Keyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_froms" json:"served_froms,omitempty"`
}

A Keyspace contains data about a keyspace.

func (*Keyspace) GetServedFroms

func (m *Keyspace) GetServedFroms() []*Keyspace_ServedFrom

func (*Keyspace) ProtoMessage

func (*Keyspace) ProtoMessage()

func (*Keyspace) Reset

func (m *Keyspace) Reset()

func (*Keyspace) String

func (m *Keyspace) String() string

type KeyspaceIdType

type KeyspaceIdType int32

KeyspaceIdType describes the type of the sharding key for a range-based sharded keyspace.

const (
	// UNSET is the default value, when range-based sharding is not used.
	KeyspaceIdType_UNSET KeyspaceIdType = 0
	// UINT64 is when uint64 value is used.
	// This is represented as 'unsigned bigint' in mysql
	KeyspaceIdType_UINT64 KeyspaceIdType = 1
	// BYTES is when an array of bytes is used.
	// This is represented as 'varbinary' in mysql
	KeyspaceIdType_BYTES KeyspaceIdType = 2
)

func (KeyspaceIdType) String

func (x KeyspaceIdType) String() string

type Keyspace_ServedFrom

type Keyspace_ServedFrom struct {
	// the tablet type (key for the map)
	TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	// the cells to limit this to
	Cells []string `protobuf:"bytes,2,rep,name=cells" json:"cells,omitempty"`
	// the keyspace name that's serving it
	Keyspace string `protobuf:"bytes,3,opt,name=keyspace" json:"keyspace,omitempty"`
}

ServedFrom indicates a relationship between a TabletType and the keyspace name that's serving it.

func (*Keyspace_ServedFrom) ProtoMessage

func (*Keyspace_ServedFrom) ProtoMessage()

func (*Keyspace_ServedFrom) Reset

func (m *Keyspace_ServedFrom) Reset()

func (*Keyspace_ServedFrom) String

func (m *Keyspace_ServedFrom) String() string

type Shard

type Shard struct {
	// master_alias is the tablet alias of the master for the shard.
	// If it is unset, then there is no master in this shard yet.
	MasterAlias *TabletAlias `protobuf:"bytes,1,opt,name=master_alias" json:"master_alias,omitempty"`
	// key_range is the KeyRange for this shard. It can be unset if:
	// - we are not using range-based sharding in this shard.
	// - the shard covers the entire keyrange.
	// This must match the shard name based on our other conventions, but
	// helpful to have it decomposed here.
	KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range" json:"key_range,omitempty"`
	// served_types has at most one entry per TabletType
	ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types" json:"served_types,omitempty"`
	// SourceShards is the list of shards we're replicating from,
	// using filtered replication.
	SourceShards []*Shard_SourceShard `protobuf:"bytes,4,rep,name=source_shards" json:"source_shards,omitempty"`
	// Cells is the list of cells that contain tablets for this shard.
	Cells []string `protobuf:"bytes,5,rep,name=cells" json:"cells,omitempty"`
	// tablet_controls has at most one entry per TabletType
	TabletControls []*Shard_TabletControl `protobuf:"bytes,6,rep,name=tablet_controls" json:"tablet_controls,omitempty"`
}

A Shard contains data about a subset of the data whithin a keyspace.

func (*Shard) GetKeyRange

func (m *Shard) GetKeyRange() *KeyRange

func (*Shard) GetMasterAlias

func (m *Shard) GetMasterAlias() *TabletAlias

func (*Shard) GetServedTypes

func (m *Shard) GetServedTypes() []*Shard_ServedType

func (*Shard) GetSourceShards

func (m *Shard) GetSourceShards() []*Shard_SourceShard

func (*Shard) GetTabletControls

func (m *Shard) GetTabletControls() []*Shard_TabletControl

func (*Shard) ProtoMessage

func (*Shard) ProtoMessage()

func (*Shard) Reset

func (m *Shard) Reset()

func (*Shard) String

func (m *Shard) String() string

type ShardReference

type ShardReference struct {
	// Copied from Shard.
	Name     string    `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range" json:"key_range,omitempty"`
}

ShardReference is used as a pointer from a SrvKeyspace to a SrvShard

func (*ShardReference) GetKeyRange

func (m *ShardReference) GetKeyRange() *KeyRange

func (*ShardReference) ProtoMessage

func (*ShardReference) ProtoMessage()

func (*ShardReference) Reset

func (m *ShardReference) Reset()

func (*ShardReference) String

func (m *ShardReference) String() string

type ShardReplication

type ShardReplication struct {
	// Note there can be only one Node in this array
	// for a given tablet.
	Nodes []*ShardReplication_Node `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}

ShardReplication describes the MySQL replication relationships whithin a cell.

func (*ShardReplication) GetNodes

func (m *ShardReplication) GetNodes() []*ShardReplication_Node

func (*ShardReplication) ProtoMessage

func (*ShardReplication) ProtoMessage()

func (*ShardReplication) Reset

func (m *ShardReplication) Reset()

func (*ShardReplication) String

func (m *ShardReplication) String() string

type ShardReplication_Node

type ShardReplication_Node struct {
	TabletAlias *TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias" json:"tablet_alias,omitempty"`
}

Node describes a tablet instance within the cell

func (*ShardReplication_Node) GetTabletAlias

func (m *ShardReplication_Node) GetTabletAlias() *TabletAlias

func (*ShardReplication_Node) ProtoMessage

func (*ShardReplication_Node) ProtoMessage()

func (*ShardReplication_Node) Reset

func (m *ShardReplication_Node) Reset()

func (*ShardReplication_Node) String

func (m *ShardReplication_Node) String() string

type Shard_ServedType

type Shard_ServedType struct {
	TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	Cells      []string   `protobuf:"bytes,2,rep,name=cells" json:"cells,omitempty"`
}

ServedType is an entry in the served_types

func (*Shard_ServedType) ProtoMessage

func (*Shard_ServedType) ProtoMessage()

func (*Shard_ServedType) Reset

func (m *Shard_ServedType) Reset()

func (*Shard_ServedType) String

func (m *Shard_ServedType) String() string

type Shard_SourceShard

type Shard_SourceShard struct {
	// Uid is the unique ID for this SourceShard object.
	Uid uint32 `protobuf:"varint,1,opt,name=uid" json:"uid,omitempty"`
	// the source keyspace
	Keyspace string `protobuf:"bytes,2,opt,name=keyspace" json:"keyspace,omitempty"`
	// the source shard
	Shard string `protobuf:"bytes,3,opt,name=shard" json:"shard,omitempty"`
	// the source shard keyrange
	KeyRange *KeyRange `protobuf:"bytes,4,opt,name=key_range" json:"key_range,omitempty"`
	// the source table list to replicate
	Tables []string `protobuf:"bytes,5,rep,name=tables" json:"tables,omitempty"`
}

SourceShard represents a data source for filtered replication accross shards. When this is used in a destination shard, the master of that shard will run filtered replication.

func (*Shard_SourceShard) GetKeyRange

func (m *Shard_SourceShard) GetKeyRange() *KeyRange

func (*Shard_SourceShard) ProtoMessage

func (*Shard_SourceShard) ProtoMessage()

func (*Shard_SourceShard) Reset

func (m *Shard_SourceShard) Reset()

func (*Shard_SourceShard) String

func (m *Shard_SourceShard) String() string

type Shard_TabletControl

type Shard_TabletControl struct {
	// which tablet type is affected
	TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	Cells      []string   `protobuf:"bytes,2,rep,name=cells" json:"cells,omitempty"`
	// what to do
	DisableQueryService bool     `protobuf:"varint,3,opt,name=disable_query_service" json:"disable_query_service,omitempty"`
	BlacklistedTables   []string `protobuf:"bytes,4,rep,name=blacklisted_tables" json:"blacklisted_tables,omitempty"`
}

TabletControl controls tablet's behavior

func (*Shard_TabletControl) ProtoMessage

func (*Shard_TabletControl) ProtoMessage()

func (*Shard_TabletControl) Reset

func (m *Shard_TabletControl) Reset()

func (*Shard_TabletControl) String

func (m *Shard_TabletControl) String() string

type SrvKeyspace

type SrvKeyspace struct {
	// The partitions this keyspace is serving, per tablet type.
	Partitions []*SrvKeyspace_KeyspacePartition `protobuf:"bytes,1,rep,name=partitions" json:"partitions,omitempty"`
	// copied from Keyspace
	ShardingColumnName string                    `protobuf:"bytes,2,opt,name=sharding_column_name" json:"sharding_column_name,omitempty"`
	ShardingColumnType KeyspaceIdType            `protobuf:"varint,3,opt,name=sharding_column_type,enum=topodata.KeyspaceIdType" json:"sharding_column_type,omitempty"`
	ServedFrom         []*SrvKeyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_from" json:"served_from,omitempty"`
	SplitShardCount    int32                     `protobuf:"varint,5,opt,name=split_shard_count" json:"split_shard_count,omitempty"`
}

SrvKeyspace is a rollup node for the keyspace itself.

func (*SrvKeyspace) GetPartitions

func (m *SrvKeyspace) GetPartitions() []*SrvKeyspace_KeyspacePartition

func (*SrvKeyspace) GetServedFrom

func (m *SrvKeyspace) GetServedFrom() []*SrvKeyspace_ServedFrom

func (*SrvKeyspace) ProtoMessage

func (*SrvKeyspace) ProtoMessage()

func (*SrvKeyspace) Reset

func (m *SrvKeyspace) Reset()

func (*SrvKeyspace) String

func (m *SrvKeyspace) String() string

type SrvKeyspace_KeyspacePartition

type SrvKeyspace_KeyspacePartition struct {
	// The type this partition applies to.
	ServedType TabletType `protobuf:"varint,1,opt,name=served_type,enum=topodata.TabletType" json:"served_type,omitempty"`
	// List of non-overlapping continuous shards sorted by range.
	ShardReferences []*ShardReference `protobuf:"bytes,2,rep,name=shard_references" json:"shard_references,omitempty"`
}

func (*SrvKeyspace_KeyspacePartition) GetShardReferences

func (m *SrvKeyspace_KeyspacePartition) GetShardReferences() []*ShardReference

func (*SrvKeyspace_KeyspacePartition) ProtoMessage

func (*SrvKeyspace_KeyspacePartition) ProtoMessage()

func (*SrvKeyspace_KeyspacePartition) Reset

func (m *SrvKeyspace_KeyspacePartition) Reset()

func (*SrvKeyspace_KeyspacePartition) String

type SrvKeyspace_ServedFrom

type SrvKeyspace_ServedFrom struct {
	// the tablet type
	TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	// the keyspace name that's serving it
	Keyspace string `protobuf:"bytes,2,opt,name=keyspace" json:"keyspace,omitempty"`
}

ServedFrom indicates a relationship between a TabletType and the keyspace name that's serving it.

func (*SrvKeyspace_ServedFrom) ProtoMessage

func (*SrvKeyspace_ServedFrom) ProtoMessage()

func (*SrvKeyspace_ServedFrom) Reset

func (m *SrvKeyspace_ServedFrom) Reset()

func (*SrvKeyspace_ServedFrom) String

func (m *SrvKeyspace_ServedFrom) String() string

type SrvShard

type SrvShard struct {
	// Copied from Shard.
	Name     string    `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range" json:"key_range,omitempty"`
	// The cell that master tablet resides in.
	MasterCell string `protobuf:"bytes,3,opt,name=master_cell" json:"master_cell,omitempty"`
}

SrvShard is a rollup node for the shard itself.

func (*SrvShard) GetKeyRange

func (m *SrvShard) GetKeyRange() *KeyRange

func (*SrvShard) ProtoMessage

func (*SrvShard) ProtoMessage()

func (*SrvShard) Reset

func (m *SrvShard) Reset()

func (*SrvShard) String

func (m *SrvShard) String() string

type Tablet

type Tablet struct {
	// alias is the unique name of the tablet.
	Alias *TabletAlias `protobuf:"bytes,1,opt,name=alias" json:"alias,omitempty"`
	// Fully qualified domain name of the host.
	Hostname string `protobuf:"bytes,2,opt,name=hostname" json:"hostname,omitempty"`
	// IP address, stored as a string.
	Ip string `protobuf:"bytes,3,opt,name=ip" json:"ip,omitempty"`
	// Map of named ports. Normally this should include vt, grpc, and mysql.
	PortMap map[string]int32 `` /* 137-byte string literal not displayed */
	// Keyspace name.
	Keyspace string `protobuf:"bytes,5,opt,name=keyspace" json:"keyspace,omitempty"`
	// Shard name. If range based sharding is used, it should match
	// key_range.
	Shard string `protobuf:"bytes,6,opt,name=shard" json:"shard,omitempty"`
	// If range based sharding is used, range for the tablet's shard.
	KeyRange *KeyRange `protobuf:"bytes,7,opt,name=key_range" json:"key_range,omitempty"`
	// type is the current type of the tablet.
	Type TabletType `protobuf:"varint,8,opt,name=type,enum=topodata.TabletType" json:"type,omitempty"`
	// It this is set, it is used as the database name instead of the
	// normal "vt_" + keyspace.
	DbNameOverride string `protobuf:"bytes,9,opt,name=db_name_override" json:"db_name_override,omitempty"`
	// tablet tags
	Tags map[string]string `` /* 129-byte string literal not displayed */
	// tablet health information
	HealthMap map[string]string `` /* 141-byte string literal not displayed */
}

Tablet represents information about a running instance of vttablet.

func (*Tablet) GetAlias

func (m *Tablet) GetAlias() *TabletAlias

func (*Tablet) GetHealthMap

func (m *Tablet) GetHealthMap() map[string]string

func (*Tablet) GetKeyRange

func (m *Tablet) GetKeyRange() *KeyRange

func (*Tablet) GetPortMap

func (m *Tablet) GetPortMap() map[string]int32

func (*Tablet) GetTags

func (m *Tablet) GetTags() map[string]string

func (*Tablet) ProtoMessage

func (*Tablet) ProtoMessage()

func (*Tablet) Reset

func (m *Tablet) Reset()

func (*Tablet) String

func (m *Tablet) String() string

type TabletAlias

type TabletAlias struct {
	// cell is the cell (or datacenter) the tablet is in
	Cell string `protobuf:"bytes,1,opt,name=cell" json:"cell,omitempty"`
	// uid is a unique id for this tablet within the shard
	// (this is the MySQL server id as well).
	Uid uint32 `protobuf:"varint,2,opt,name=uid" json:"uid,omitempty"`
}

TabletAlias is a globally unique tablet identifier.

func (*TabletAlias) ProtoMessage

func (*TabletAlias) ProtoMessage()

func (*TabletAlias) Reset

func (m *TabletAlias) Reset()

func (*TabletAlias) String

func (m *TabletAlias) String() string

type TabletType

type TabletType int32

TabletType represents the type of a given tablet.

const (
	TabletType_UNKNOWN        TabletType = 0
	TabletType_IDLE           TabletType = 1
	TabletType_MASTER         TabletType = 2
	TabletType_REPLICA        TabletType = 3
	TabletType_RDONLY         TabletType = 4
	TabletType_BATCH          TabletType = 4
	TabletType_SPARE          TabletType = 5
	TabletType_EXPERIMENTAL   TabletType = 6
	TabletType_SCHEMA_UPGRADE TabletType = 7
	TabletType_BACKUP         TabletType = 8
	TabletType_RESTORE        TabletType = 9
	TabletType_WORKER         TabletType = 10
	TabletType_SCRAP          TabletType = 11
)

func (TabletType) String

func (x TabletType) String() string

Jump to

Keyboard shortcuts

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