topodata

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

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: "DRAINED",
}
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,
	"DRAINED":      8,
}

Functions

This section is empty.

Types

type CellInfo

type CellInfo struct {
	// ServerAddress contains the address of the server for the cell.
	// The syntax of this field is topology implementation specific.
	// For instance, for Zookeeper, it is a comma-separated list of
	// server addresses.
	ServerAddress string `protobuf:"bytes,1,opt,name=server_address,json=serverAddress,proto3" json:"server_address,omitempty"`
	// Root is the path to store data in. It is only used when talking
	// to server_address.
	Root string `protobuf:"bytes,2,opt,name=root,proto3" json:"root,omitempty"`
	// Region is a group this cell belongs to. Used by vtgate to route traffic to
	// other cells (in same region) when there is no available tablet in the current cell.
	Region               string   `protobuf:"bytes,3,opt,name=region,proto3" json:"region,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

CellInfo contains information about a cell. CellInfo objects are stored in the global topology server, and describe how to reach local topology servers.

func (*CellInfo) Descriptor

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

func (*CellInfo) GetRegion

func (m *CellInfo) GetRegion() string

func (*CellInfo) GetRoot

func (m *CellInfo) GetRoot() string

func (*CellInfo) GetServerAddress

func (m *CellInfo) GetServerAddress() string

func (*CellInfo) ProtoMessage

func (*CellInfo) ProtoMessage()

func (*CellInfo) Reset

func (m *CellInfo) Reset()

func (*CellInfo) String

func (m *CellInfo) String() string

func (*CellInfo) XXX_DiscardUnknown

func (m *CellInfo) XXX_DiscardUnknown()

func (*CellInfo) XXX_Marshal

func (m *CellInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CellInfo) XXX_Merge

func (dst *CellInfo) XXX_Merge(src proto.Message)

func (*CellInfo) XXX_Size

func (m *CellInfo) XXX_Size() int

func (*CellInfo) XXX_Unmarshal

func (m *CellInfo) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (*KeyRange) Descriptor

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

func (*KeyRange) GetEnd

func (m *KeyRange) GetEnd() []byte

func (*KeyRange) GetStart

func (m *KeyRange) GetStart() []byte

func (*KeyRange) ProtoMessage

func (*KeyRange) ProtoMessage()

func (*KeyRange) Reset

func (m *KeyRange) Reset()

func (*KeyRange) String

func (m *KeyRange) String() string

func (*KeyRange) XXX_DiscardUnknown

func (m *KeyRange) XXX_DiscardUnknown()

func (*KeyRange) XXX_Marshal

func (m *KeyRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyRange) XXX_Merge

func (dst *KeyRange) XXX_Merge(src proto.Message)

func (*KeyRange) XXX_Size

func (m *KeyRange) XXX_Size() int

func (*KeyRange) XXX_Unmarshal

func (m *KeyRange) XXX_Unmarshal(b []byte) error

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,proto3" json:"sharding_column_name,omitempty"`
	// type of the column used for sharding
	// UNSET if the keyspace is not sharded
	ShardingColumnType KeyspaceIdType `` /* 147-byte string literal not displayed */
	// ServedFrom will redirect the appropriate traffic to
	// another keyspace.
	ServedFroms          []*Keyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_froms,json=servedFroms,proto3" json:"served_froms,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

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

func (m *Keyspace) GetShardingColumnName() string

func (*Keyspace) GetShardingColumnType

func (m *Keyspace) GetShardingColumnType() KeyspaceIdType

func (*Keyspace) ProtoMessage

func (*Keyspace) ProtoMessage()

func (*Keyspace) Reset

func (m *Keyspace) Reset()

func (*Keyspace) String

func (m *Keyspace) String() string

func (*Keyspace) XXX_DiscardUnknown

func (m *Keyspace) XXX_DiscardUnknown()

func (*Keyspace) XXX_Marshal

func (m *Keyspace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Keyspace) XXX_Merge

func (dst *Keyspace) XXX_Merge(src proto.Message)

func (*Keyspace) XXX_Size

func (m *Keyspace) XXX_Size() int

func (*Keyspace) XXX_Unmarshal

func (m *Keyspace) XXX_Unmarshal(b []byte) error

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,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	// the cells to limit this to
	Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
	// the keyspace name that's serving it
	Keyspace             string   `protobuf:"bytes,3,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *Keyspace_ServedFrom) GetCells() []string

func (*Keyspace_ServedFrom) GetKeyspace

func (m *Keyspace_ServedFrom) GetKeyspace() string

func (*Keyspace_ServedFrom) GetTabletType

func (m *Keyspace_ServedFrom) GetTabletType() TabletType

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

func (*Keyspace_ServedFrom) XXX_DiscardUnknown

func (m *Keyspace_ServedFrom) XXX_DiscardUnknown()

func (*Keyspace_ServedFrom) XXX_Marshal

func (m *Keyspace_ServedFrom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Keyspace_ServedFrom) XXX_Merge

func (dst *Keyspace_ServedFrom) XXX_Merge(src proto.Message)

func (*Keyspace_ServedFrom) XXX_Size

func (m *Keyspace_ServedFrom) XXX_Size() int

func (*Keyspace_ServedFrom) XXX_Unmarshal

func (m *Keyspace_ServedFrom) XXX_Unmarshal(b []byte) error

type Shard

type Shard struct {
	// No lock is necessary to update this field, when for instance
	// TabletExternallyReparented updates this. However, we lock the
	// shard for reparenting operations (InitShardMaster,
	// PlannedReparentShard,EmergencyReparentShard), to guarantee
	// exclusive operation.
	MasterAlias *TabletAlias `protobuf:"bytes,1,opt,name=master_alias,json=masterAlias,proto3" 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.
	// Once set at creation time, it is never changed.
	KeyRange *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
	// served_types has at most one entry per TabletType
	// The keyspace lock is always taken when changing this.
	ServedTypes []*Shard_ServedType `protobuf:"bytes,3,rep,name=served_types,json=servedTypes,proto3" json:"served_types,omitempty"`
	// SourceShards is the list of shards we're replicating from,
	// using filtered replication.
	// The keyspace lock is always taken when changing this.
	SourceShards []*Shard_SourceShard `protobuf:"bytes,4,rep,name=source_shards,json=sourceShards,proto3" json:"source_shards,omitempty"`
	// Cells is the list of cells that contain tablets for this shard.
	// No lock is necessary to update this field.
	Cells []string `protobuf:"bytes,5,rep,name=cells,proto3" json:"cells,omitempty"`
	// tablet_controls has at most one entry per TabletType.
	// The keyspace lock is always taken when changing this.
	TabletControls       []*Shard_TabletControl `protobuf:"bytes,6,rep,name=tablet_controls,json=tabletControls,proto3" json:"tablet_controls,omitempty"`
	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
	XXX_unrecognized     []byte                 `json:"-"`
	XXX_sizecache        int32                  `json:"-"`
}

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

func (*Shard) Descriptor

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

func (*Shard) GetCells

func (m *Shard) GetCells() []string

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

func (*Shard) XXX_DiscardUnknown

func (m *Shard) XXX_DiscardUnknown()

func (*Shard) XXX_Marshal

func (m *Shard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Shard) XXX_Merge

func (dst *Shard) XXX_Merge(src proto.Message)

func (*Shard) XXX_Size

func (m *Shard) XXX_Size() int

func (*Shard) XXX_Unmarshal

func (m *Shard) XXX_Unmarshal(b []byte) error

type ShardReference

type ShardReference struct {
	// Copied from Shard.
	Name                 string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	KeyRange             *KeyRange `protobuf:"bytes,2,opt,name=key_range,json=keyRange,proto3" json:"key_range,omitempty"`
	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
	XXX_unrecognized     []byte    `json:"-"`
	XXX_sizecache        int32     `json:"-"`
}

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

func (*ShardReference) Descriptor

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

func (*ShardReference) GetKeyRange

func (m *ShardReference) GetKeyRange() *KeyRange

func (*ShardReference) GetName

func (m *ShardReference) GetName() string

func (*ShardReference) ProtoMessage

func (*ShardReference) ProtoMessage()

func (*ShardReference) Reset

func (m *ShardReference) Reset()

func (*ShardReference) String

func (m *ShardReference) String() string

func (*ShardReference) XXX_DiscardUnknown

func (m *ShardReference) XXX_DiscardUnknown()

func (*ShardReference) XXX_Marshal

func (m *ShardReference) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShardReference) XXX_Merge

func (dst *ShardReference) XXX_Merge(src proto.Message)

func (*ShardReference) XXX_Size

func (m *ShardReference) XXX_Size() int

func (*ShardReference) XXX_Unmarshal

func (m *ShardReference) XXX_Unmarshal(b []byte) error

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,proto3" json:"nodes,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                 `json:"-"`
	XXX_unrecognized     []byte                   `json:"-"`
	XXX_sizecache        int32                    `json:"-"`
}

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

func (*ShardReplication) XXX_DiscardUnknown

func (m *ShardReplication) XXX_DiscardUnknown()

func (*ShardReplication) XXX_Marshal

func (m *ShardReplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShardReplication) XXX_Merge

func (dst *ShardReplication) XXX_Merge(src proto.Message)

func (*ShardReplication) XXX_Size

func (m *ShardReplication) XXX_Size() int

func (*ShardReplication) XXX_Unmarshal

func (m *ShardReplication) XXX_Unmarshal(b []byte) error

type ShardReplication_Node

type ShardReplication_Node struct {
	TabletAlias          *TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

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

func (*ShardReplication_Node) XXX_DiscardUnknown

func (m *ShardReplication_Node) XXX_DiscardUnknown()

func (*ShardReplication_Node) XXX_Marshal

func (m *ShardReplication_Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ShardReplication_Node) XXX_Merge

func (dst *ShardReplication_Node) XXX_Merge(src proto.Message)

func (*ShardReplication_Node) XXX_Size

func (m *ShardReplication_Node) XXX_Size() int

func (*ShardReplication_Node) XXX_Unmarshal

func (m *ShardReplication_Node) XXX_Unmarshal(b []byte) error

type Shard_ServedType

type Shard_ServedType struct {
	TabletType           TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	Cells                []string   `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

ServedType is an entry in the served_types

func (*Shard_ServedType) Descriptor

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

func (*Shard_ServedType) GetCells

func (m *Shard_ServedType) GetCells() []string

func (*Shard_ServedType) GetTabletType

func (m *Shard_ServedType) GetTabletType() TabletType

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

func (*Shard_ServedType) XXX_DiscardUnknown

func (m *Shard_ServedType) XXX_DiscardUnknown()

func (*Shard_ServedType) XXX_Marshal

func (m *Shard_ServedType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Shard_ServedType) XXX_Merge

func (dst *Shard_ServedType) XXX_Merge(src proto.Message)

func (*Shard_ServedType) XXX_Size

func (m *Shard_ServedType) XXX_Size() int

func (*Shard_ServedType) XXX_Unmarshal

func (m *Shard_ServedType) XXX_Unmarshal(b []byte) error

type Shard_SourceShard

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

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

func (m *Shard_SourceShard) GetKeyspace() string

func (*Shard_SourceShard) GetShard

func (m *Shard_SourceShard) GetShard() string

func (*Shard_SourceShard) GetTables

func (m *Shard_SourceShard) GetTables() []string

func (*Shard_SourceShard) GetUid

func (m *Shard_SourceShard) GetUid() uint32

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

func (*Shard_SourceShard) XXX_DiscardUnknown

func (m *Shard_SourceShard) XXX_DiscardUnknown()

func (*Shard_SourceShard) XXX_Marshal

func (m *Shard_SourceShard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Shard_SourceShard) XXX_Merge

func (dst *Shard_SourceShard) XXX_Merge(src proto.Message)

func (*Shard_SourceShard) XXX_Size

func (m *Shard_SourceShard) XXX_Size() int

func (*Shard_SourceShard) XXX_Unmarshal

func (m *Shard_SourceShard) XXX_Unmarshal(b []byte) error

type Shard_TabletControl

type Shard_TabletControl struct {
	// which tablet type is affected
	TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	Cells      []string   `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
	// what to do
	DisableQueryService bool     `protobuf:"varint,3,opt,name=disable_query_service,json=disableQueryService,proto3" json:"disable_query_service,omitempty"`
	BlacklistedTables   []string `protobuf:"bytes,4,rep,name=blacklisted_tables,json=blacklistedTables,proto3" json:"blacklisted_tables,omitempty"`
	// frozen is set if we've started failing over traffic for
	// the master. If set, this record should not be removed.
	Frozen               bool     `protobuf:"varint,5,opt,name=frozen,proto3" json:"frozen,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TabletControl controls tablet's behavior

func (*Shard_TabletControl) Descriptor

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

func (*Shard_TabletControl) GetBlacklistedTables

func (m *Shard_TabletControl) GetBlacklistedTables() []string

func (*Shard_TabletControl) GetCells

func (m *Shard_TabletControl) GetCells() []string

func (*Shard_TabletControl) GetDisableQueryService

func (m *Shard_TabletControl) GetDisableQueryService() bool

func (*Shard_TabletControl) GetFrozen

func (m *Shard_TabletControl) GetFrozen() bool

func (*Shard_TabletControl) GetTabletType

func (m *Shard_TabletControl) GetTabletType() TabletType

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

func (*Shard_TabletControl) XXX_DiscardUnknown

func (m *Shard_TabletControl) XXX_DiscardUnknown()

func (*Shard_TabletControl) XXX_Marshal

func (m *Shard_TabletControl) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Shard_TabletControl) XXX_Merge

func (dst *Shard_TabletControl) XXX_Merge(src proto.Message)

func (*Shard_TabletControl) XXX_Size

func (m *Shard_TabletControl) XXX_Size() int

func (*Shard_TabletControl) XXX_Unmarshal

func (m *Shard_TabletControl) XXX_Unmarshal(b []byte) error

type SrvKeyspace

type SrvKeyspace struct {
	// The partitions this keyspace is serving, per tablet type.
	Partitions []*SrvKeyspace_KeyspacePartition `protobuf:"bytes,1,rep,name=partitions,proto3" json:"partitions,omitempty"`
	// copied from Keyspace
	ShardingColumnName   string                    `protobuf:"bytes,2,opt,name=sharding_column_name,json=shardingColumnName,proto3" json:"sharding_column_name,omitempty"`
	ShardingColumnType   KeyspaceIdType            `` /* 147-byte string literal not displayed */
	ServedFrom           []*SrvKeyspace_ServedFrom `protobuf:"bytes,4,rep,name=served_from,json=servedFrom,proto3" json:"served_from,omitempty"`
	XXX_NoUnkeyedLiteral struct{}                  `json:"-"`
	XXX_unrecognized     []byte                    `json:"-"`
	XXX_sizecache        int32                     `json:"-"`
}

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

func (m *SrvKeyspace) GetShardingColumnName() string

func (*SrvKeyspace) GetShardingColumnType

func (m *SrvKeyspace) GetShardingColumnType() KeyspaceIdType

func (*SrvKeyspace) ProtoMessage

func (*SrvKeyspace) ProtoMessage()

func (*SrvKeyspace) Reset

func (m *SrvKeyspace) Reset()

func (*SrvKeyspace) String

func (m *SrvKeyspace) String() string

func (*SrvKeyspace) XXX_DiscardUnknown

func (m *SrvKeyspace) XXX_DiscardUnknown()

func (*SrvKeyspace) XXX_Marshal

func (m *SrvKeyspace) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SrvKeyspace) XXX_Merge

func (dst *SrvKeyspace) XXX_Merge(src proto.Message)

func (*SrvKeyspace) XXX_Size

func (m *SrvKeyspace) XXX_Size() int

func (*SrvKeyspace) XXX_Unmarshal

func (m *SrvKeyspace) XXX_Unmarshal(b []byte) error

type SrvKeyspace_KeyspacePartition

type SrvKeyspace_KeyspacePartition struct {
	// The type this partition applies to.
	ServedType TabletType `protobuf:"varint,1,opt,name=served_type,json=servedType,proto3,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,proto3" json:"shard_references,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*SrvKeyspace_KeyspacePartition) Descriptor

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

func (*SrvKeyspace_KeyspacePartition) GetServedType

func (m *SrvKeyspace_KeyspacePartition) GetServedType() TabletType

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

func (*SrvKeyspace_KeyspacePartition) XXX_DiscardUnknown

func (m *SrvKeyspace_KeyspacePartition) XXX_DiscardUnknown()

func (*SrvKeyspace_KeyspacePartition) XXX_Marshal

func (m *SrvKeyspace_KeyspacePartition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SrvKeyspace_KeyspacePartition) XXX_Merge

func (dst *SrvKeyspace_KeyspacePartition) XXX_Merge(src proto.Message)

func (*SrvKeyspace_KeyspacePartition) XXX_Size

func (m *SrvKeyspace_KeyspacePartition) XXX_Size() int

func (*SrvKeyspace_KeyspacePartition) XXX_Unmarshal

func (m *SrvKeyspace_KeyspacePartition) XXX_Unmarshal(b []byte) error

type SrvKeyspace_ServedFrom

type SrvKeyspace_ServedFrom struct {
	// the tablet type
	TabletType TabletType `protobuf:"varint,1,opt,name=tablet_type,json=tabletType,proto3,enum=topodata.TabletType" json:"tablet_type,omitempty"`
	// the keyspace name that's serving it
	Keyspace             string   `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *SrvKeyspace_ServedFrom) GetKeyspace() string

func (*SrvKeyspace_ServedFrom) GetTabletType

func (m *SrvKeyspace_ServedFrom) GetTabletType() TabletType

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

func (*SrvKeyspace_ServedFrom) XXX_DiscardUnknown

func (m *SrvKeyspace_ServedFrom) XXX_DiscardUnknown()

func (*SrvKeyspace_ServedFrom) XXX_Marshal

func (m *SrvKeyspace_ServedFrom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SrvKeyspace_ServedFrom) XXX_Merge

func (dst *SrvKeyspace_ServedFrom) XXX_Merge(src proto.Message)

func (*SrvKeyspace_ServedFrom) XXX_Size

func (m *SrvKeyspace_ServedFrom) XXX_Size() int

func (*SrvKeyspace_ServedFrom) XXX_Unmarshal

func (m *SrvKeyspace_ServedFrom) XXX_Unmarshal(b []byte) error

type Tablet

type Tablet struct {
	// alias is the unique name of the tablet.
	Alias *TabletAlias `protobuf:"bytes,1,opt,name=alias,proto3" json:"alias,omitempty"`
	// Fully qualified domain name of the host.
	Hostname string `protobuf:"bytes,2,opt,name=hostname,proto3" json:"hostname,omitempty"`
	// Map of named ports. Normally this should include vt and grpc.
	// Going forward, the mysql port will be stored in mysql_port
	// instead of here.
	// For accessing mysql port, use topoproto.MysqlPort to fetch, and
	// topoproto.SetMysqlPort to set. These wrappers will ensure
	// legacy behavior is supported.
	PortMap map[string]int32 `` /* 171-byte string literal not displayed */
	// Keyspace name.
	Keyspace string `protobuf:"bytes,5,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
	// Shard name. If range based sharding is used, it should match
	// key_range.
	Shard string `protobuf:"bytes,6,opt,name=shard,proto3" 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,proto3" json:"key_range,omitempty"`
	// type is the current type of the tablet.
	Type TabletType `protobuf:"varint,8,opt,name=type,proto3,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,proto3" json:"db_name_override,omitempty"`
	// tablet tags
	Tags map[string]string `` /* 150-byte string literal not displayed */
	// MySQL hostname.
	MysqlHostname string `protobuf:"bytes,12,opt,name=mysql_hostname,json=mysqlHostname,proto3" json:"mysql_hostname,omitempty"`
	// MySQL port. Use topoproto.MysqlPort and topoproto.SetMysqlPort
	// to access this variable. The functions provide support
	// for legacy behavior.
	MysqlPort            int32    `protobuf:"varint,13,opt,name=mysql_port,json=mysqlPort,proto3" json:"mysql_port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

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

func (m *Tablet) GetDbNameOverride() string

func (*Tablet) GetHostname

func (m *Tablet) GetHostname() string

func (*Tablet) GetKeyRange

func (m *Tablet) GetKeyRange() *KeyRange

func (*Tablet) GetKeyspace

func (m *Tablet) GetKeyspace() string

func (*Tablet) GetMysqlHostname

func (m *Tablet) GetMysqlHostname() string

func (*Tablet) GetMysqlPort

func (m *Tablet) GetMysqlPort() int32

func (*Tablet) GetPortMap

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

func (*Tablet) GetShard

func (m *Tablet) GetShard() string

func (*Tablet) GetTags

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

func (*Tablet) GetType

func (m *Tablet) GetType() TabletType

func (*Tablet) ProtoMessage

func (*Tablet) ProtoMessage()

func (*Tablet) Reset

func (m *Tablet) Reset()

func (*Tablet) String

func (m *Tablet) String() string

func (*Tablet) XXX_DiscardUnknown

func (m *Tablet) XXX_DiscardUnknown()

func (*Tablet) XXX_Marshal

func (m *Tablet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Tablet) XXX_Merge

func (dst *Tablet) XXX_Merge(src proto.Message)

func (*Tablet) XXX_Size

func (m *Tablet) XXX_Size() int

func (*Tablet) XXX_Unmarshal

func (m *Tablet) XXX_Unmarshal(b []byte) error

type TabletAlias

type TabletAlias struct {
	// cell is the cell (or datacenter) the tablet is in
	Cell string `protobuf:"bytes,1,opt,name=cell,proto3" 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,proto3" json:"uid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

TabletAlias is a globally unique tablet identifier.

func (*TabletAlias) Descriptor

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

func (*TabletAlias) GetCell

func (m *TabletAlias) GetCell() string

func (*TabletAlias) GetUid

func (m *TabletAlias) GetUid() uint32

func (*TabletAlias) ProtoMessage

func (*TabletAlias) ProtoMessage()

func (*TabletAlias) Reset

func (m *TabletAlias) Reset()

func (*TabletAlias) String

func (m *TabletAlias) String() string

func (*TabletAlias) XXX_DiscardUnknown

func (m *TabletAlias) XXX_DiscardUnknown()

func (*TabletAlias) XXX_Marshal

func (m *TabletAlias) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TabletAlias) XXX_Merge

func (dst *TabletAlias) XXX_Merge(src proto.Message)

func (*TabletAlias) XXX_Size

func (m *TabletAlias) XXX_Size() int

func (*TabletAlias) XXX_Unmarshal

func (m *TabletAlias) XXX_Unmarshal(b []byte) error

type TabletType

type TabletType int32

TabletType represents the type of a given tablet.

const (
	// UNKNOWN is not a valid value.
	TabletType_UNKNOWN TabletType = 0
	// MASTER is the master server for the shard. Only MASTER allows DMLs.
	TabletType_MASTER TabletType = 1
	// REPLICA is a slave type. It is used to serve live traffic.
	// A REPLICA can be promoted to MASTER. A demoted MASTER will go to REPLICA.
	TabletType_REPLICA TabletType = 2
	// RDONLY (old name) / BATCH (new name) is used to serve traffic for
	// long-running jobs. It is a separate type from REPLICA so
	// long-running queries don't affect web-like traffic.
	TabletType_RDONLY TabletType = 3
	TabletType_BATCH  TabletType = 3
	// SPARE is a type of servers that cannot serve queries, but is available
	// in case an extra server is needed.
	TabletType_SPARE TabletType = 4
	// EXPERIMENTAL is like SPARE, except it can serve queries. This
	// type can be used for usages not planned by Vitess, like online
	// export to another storage engine.
	TabletType_EXPERIMENTAL TabletType = 5
	// BACKUP is the type a server goes to when taking a backup. No queries
	// can be served in BACKUP mode.
	TabletType_BACKUP TabletType = 6
	// RESTORE is the type a server uses when restoring a backup, at
	// startup time.  No queries can be served in RESTORE mode.
	TabletType_RESTORE TabletType = 7
	// DRAINED is the type a server goes into when used by Vitess tools
	// to perform an offline action. It is a serving type (as
	// the tools processes may need to run queries), but it's not used
	// to route queries from Vitess users. In this state,
	// this tablet is dedicated to the process that uses it.
	TabletType_DRAINED 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