topodata

package
v2.0.0-beta.2+incompat... Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2016 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: "MASTER",
	2: "REPLICA",
	3: "RDONLY",

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

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 `` /* 150-byte string literal not displayed */
	// The health entries.
	HealthMap map[string]string `` /* 155-byte string literal not displayed */
}

EndPoint corresponds to a single tablet.

func (*EndPoint) Descriptor

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

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) Descriptor

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

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) Descriptor

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

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=shardingColumnName" json:"sharding_column_name,omitempty"`
	// type of the column used for sharding
	// UNSET if the keyspace is not sharded
	ShardingColumnType KeyspaceIdType `` /* 140-byte string literal not displayed */
	// 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=splitShardCount" 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=servedFroms" json:"served_froms,omitempty"`
}

A Keyspace contains data about a keyspace.

func (*Keyspace) Descriptor

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

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) EnumDescriptor

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

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,json=tabletType,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) Descriptor

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

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=masterAlias" 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=keyRange" json:"key_range,omitempty"`
	// served_types has at most one entry per TabletType
	ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types,json=servedTypes" 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=sourceShards" 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=tabletControls" json:"tablet_controls,omitempty"`
}

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

func (*Shard) Descriptor

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

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=keyRange" json:"key_range,omitempty"`
}

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

func (*ShardReference) Descriptor

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

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) Descriptor

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

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=tabletAlias" json:"tablet_alias,omitempty"`
}

Node describes a tablet instance within the cell

func (*ShardReplication_Node) Descriptor

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

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,json=tabletType,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) Descriptor

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

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=keyRange" 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) Descriptor

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

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,json=tabletType,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=disableQueryService" json:"disable_query_service,omitempty"`
	BlacklistedTables   []string `protobuf:"bytes,4,rep,name=blacklisted_tables,json=blacklistedTables" json:"blacklisted_tables,omitempty"`
}

TabletControl controls tablet's behavior

func (*Shard_TabletControl) Descriptor

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

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=shardingColumnName" json:"sharding_column_name,omitempty"`
	ShardingColumnType KeyspaceIdType            `` /* 140-byte string literal not displayed */
	ServedFrom         []*SrvKeyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_from,json=servedFrom" json:"served_from,omitempty"`
	SplitShardCount    int32                     `protobuf:"varint,5,opt,name=split_shard_count,json=splitShardCount" json:"split_shard_count,omitempty"`
}

SrvKeyspace is a rollup node for the keyspace itself.

func (*SrvKeyspace) Descriptor

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

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,json=servedType,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=shardReferences" json:"shard_references,omitempty"`
}

func (*SrvKeyspace_KeyspacePartition) Descriptor

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

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,json=tabletType,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) Descriptor

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

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=keyRange" json:"key_range,omitempty"`
	// The cell that master tablet resides in.
	MasterCell string `protobuf:"bytes,3,opt,name=master_cell,json=masterCell" json:"master_cell,omitempty"`
}

SrvShard is a rollup node for the shard itself.

func (*SrvShard) Descriptor

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

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 `` /* 150-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=keyRange" 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=dbNameOverride" json:"db_name_override,omitempty"`
	// tablet tags
	Tags map[string]string `` /* 129-byte string literal not displayed */
	// tablet health information
	HealthMap map[string]string `` /* 156-byte string literal not displayed */
}

Tablet represents information about a running instance of vttablet.

func (*Tablet) Descriptor

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

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) Descriptor

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

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_MASTER       TabletType = 1
	TabletType_REPLICA      TabletType = 2
	TabletType_RDONLY       TabletType = 3
	TabletType_BATCH        TabletType = 3
	TabletType_SPARE        TabletType = 4
	TabletType_EXPERIMENTAL TabletType = 5
	TabletType_BACKUP       TabletType = 6
	TabletType_RESTORE      TabletType = 7
	TabletType_WORKER       TabletType = 8
)

func (TabletType) EnumDescriptor

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

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