topodatav18

package
v1.33.0-20231211191728... Latest Latest
Warning

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

Go to latest
Published: unknown License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KeyspaceType_name = map[int32]string{
		0: "NORMAL",
		1: "SNAPSHOT",
	}
	KeyspaceType_value = map[string]int32{
		"NORMAL":   0,
		"SNAPSHOT": 1,
	}
)

Enum value maps for KeyspaceType.

View Source
var (
	TabletType_name = map[int32]string{
		0: "UNKNOWN",
		1: "PRIMARY",

		2: "REPLICA",
		3: "RDONLY",

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

Enum value maps for TabletType.

View Source
var (
	ShardReplicationError_Type_name = map[int32]string{
		0: "UNKNOWN",
		1: "NOT_FOUND",
		2: "TOPOLOGY_MISMATCH",
	}
	ShardReplicationError_Type_value = map[string]int32{
		"UNKNOWN":           0,
		"NOT_FOUND":         1,
		"TOPOLOGY_MISMATCH": 2,
	}
)

Enum value maps for ShardReplicationError_Type.

View Source
var File_vitess_topodata_v18_topodata_proto protoreflect.FileDescriptor

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"`
	// contains filtered or unexported fields
}

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 deprecated

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

Deprecated: Use CellInfo.ProtoReflect.Descriptor instead.

func (*CellInfo) GetRoot

func (x *CellInfo) GetRoot() string

func (*CellInfo) GetServerAddress

func (x *CellInfo) GetServerAddress() string

func (*CellInfo) ProtoMessage

func (*CellInfo) ProtoMessage()

func (*CellInfo) ProtoReflect

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

func (*CellInfo) Reset

func (x *CellInfo) Reset()

func (*CellInfo) String

func (x *CellInfo) String() string

type CellsAlias

type CellsAlias struct {

	// Cells that map to this alias
	Cells []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
	// contains filtered or unexported fields
}

CellsAlias

func (*CellsAlias) Descriptor deprecated

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

Deprecated: Use CellsAlias.ProtoReflect.Descriptor instead.

func (*CellsAlias) GetCells

func (x *CellsAlias) GetCells() []string

func (*CellsAlias) ProtoMessage

func (*CellsAlias) ProtoMessage()

func (*CellsAlias) ProtoReflect

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

func (*CellsAlias) Reset

func (x *CellsAlias) Reset()

func (*CellsAlias) String

func (x *CellsAlias) String() string

type ExternalClusters

type ExternalClusters struct {
	VitessCluster []*ExternalVitessCluster `protobuf:"bytes,1,rep,name=vitess_cluster,json=vitessCluster,proto3" json:"vitess_cluster,omitempty"`
	// contains filtered or unexported fields
}

ExternalClusters

func (*ExternalClusters) Descriptor deprecated

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

Deprecated: Use ExternalClusters.ProtoReflect.Descriptor instead.

func (*ExternalClusters) GetVitessCluster

func (x *ExternalClusters) GetVitessCluster() []*ExternalVitessCluster

func (*ExternalClusters) ProtoMessage

func (*ExternalClusters) ProtoMessage()

func (*ExternalClusters) ProtoReflect

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

func (*ExternalClusters) Reset

func (x *ExternalClusters) Reset()

func (*ExternalClusters) String

func (x *ExternalClusters) String() string

type ExternalVitessCluster

type ExternalVitessCluster struct {
	TopoConfig *TopoConfig `protobuf:"bytes,1,opt,name=topo_config,json=topoConfig,proto3" json:"topo_config,omitempty"`
	// contains filtered or unexported fields
}

func (*ExternalVitessCluster) Descriptor deprecated

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

Deprecated: Use ExternalVitessCluster.ProtoReflect.Descriptor instead.

func (*ExternalVitessCluster) GetTopoConfig

func (x *ExternalVitessCluster) GetTopoConfig() *TopoConfig

func (*ExternalVitessCluster) ProtoMessage

func (*ExternalVitessCluster) ProtoMessage()

func (*ExternalVitessCluster) ProtoReflect

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

func (*ExternalVitessCluster) Reset

func (x *ExternalVitessCluster) Reset()

func (*ExternalVitessCluster) String

func (x *ExternalVitessCluster) 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"`
	// contains filtered or unexported fields
}

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

func (*KeyRange) Descriptor deprecated

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

Deprecated: Use KeyRange.ProtoReflect.Descriptor instead.

func (*KeyRange) GetEnd

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

func (*KeyRange) GetStart

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

func (*KeyRange) ProtoMessage

func (*KeyRange) ProtoMessage()

func (*KeyRange) ProtoReflect

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

func (*KeyRange) Reset

func (x *KeyRange) Reset()

func (*KeyRange) String

func (x *KeyRange) String() string

type Keyspace

type Keyspace struct {

	// 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"`
	// keyspace_type will determine how this keyspace is treated by
	// vtgate / vschema. Normal keyspaces are routable by
	// any query. Snapshot keyspaces are only accessible
	// by explicit addresssing or by calling "use keyspace" first
	KeyspaceType KeyspaceType `` /* 136-byte string literal not displayed */
	// base_keyspace is the base keyspace from which a snapshot
	// keyspace is created. empty for normal keyspaces
	BaseKeyspace string `protobuf:"bytes,6,opt,name=base_keyspace,json=baseKeyspace,proto3" json:"base_keyspace,omitempty"`
	// snapshot_time (in UTC) is a property of snapshot
	// keyspaces which tells us what point in time
	// the snapshot is of
	SnapshotTime *v18.Time `protobuf:"bytes,7,opt,name=snapshot_time,json=snapshotTime,proto3" json:"snapshot_time,omitempty"`
	// DurabilityPolicy is the durability policy to be
	// used for the keyspace.
	DurabilityPolicy string `protobuf:"bytes,8,opt,name=durability_policy,json=durabilityPolicy,proto3" json:"durability_policy,omitempty"`
	// ThrottlerConfig has the configuration for the tablet
	// server's lag throttler, and applies to the entire
	// keyspace, across all shards and tablets.
	ThrottlerConfig *ThrottlerConfig `protobuf:"bytes,9,opt,name=throttler_config,json=throttlerConfig,proto3" json:"throttler_config,omitempty"`
	// SidecarDBName is the name of the Vitess sidecar database
	// used for various system metadata that is stored in each
	// tablet's mysqld instance.
	SidecarDbName string `protobuf:"bytes,10,opt,name=sidecar_db_name,json=sidecarDbName,proto3" json:"sidecar_db_name,omitempty"`
	// contains filtered or unexported fields
}

A Keyspace contains data about a keyspace.

func (*Keyspace) Descriptor deprecated

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

Deprecated: Use Keyspace.ProtoReflect.Descriptor instead.

func (*Keyspace) GetBaseKeyspace

func (x *Keyspace) GetBaseKeyspace() string

func (*Keyspace) GetDurabilityPolicy

func (x *Keyspace) GetDurabilityPolicy() string

func (*Keyspace) GetKeyspaceType

func (x *Keyspace) GetKeyspaceType() KeyspaceType

func (*Keyspace) GetServedFroms

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

func (*Keyspace) GetSidecarDbName

func (x *Keyspace) GetSidecarDbName() string

func (*Keyspace) GetSnapshotTime

func (x *Keyspace) GetSnapshotTime() *v18.Time

func (*Keyspace) GetThrottlerConfig

func (x *Keyspace) GetThrottlerConfig() *ThrottlerConfig

func (*Keyspace) ProtoMessage

func (*Keyspace) ProtoMessage()

func (*Keyspace) ProtoReflect

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

func (*Keyspace) Reset

func (x *Keyspace) Reset()

func (*Keyspace) String

func (x *Keyspace) String() string

type KeyspaceType

type KeyspaceType int32

KeyspaceType describes the type of the keyspace

const (
	// NORMAL is the default value
	KeyspaceType_NORMAL KeyspaceType = 0
	// SNAPSHOT is when we are creating a snapshot keyspace
	KeyspaceType_SNAPSHOT KeyspaceType = 1
)

func (KeyspaceType) Descriptor

func (KeyspaceType) Enum

func (x KeyspaceType) Enum() *KeyspaceType

func (KeyspaceType) EnumDescriptor deprecated

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

Deprecated: Use KeyspaceType.Descriptor instead.

func (KeyspaceType) Number

func (KeyspaceType) String

func (x KeyspaceType) String() string

func (KeyspaceType) Type

type Keyspace_ServedFrom

type Keyspace_ServedFrom struct {

	// the tablet type (key for the map)
	TabletType TabletType `` /* 128-byte string literal not displayed */
	// 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"`
	// contains filtered or unexported fields
}

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

func (*Keyspace_ServedFrom) Descriptor deprecated

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

Deprecated: Use Keyspace_ServedFrom.ProtoReflect.Descriptor instead.

func (*Keyspace_ServedFrom) GetCells

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

func (*Keyspace_ServedFrom) GetKeyspace

func (x *Keyspace_ServedFrom) GetKeyspace() string

func (*Keyspace_ServedFrom) GetTabletType

func (x *Keyspace_ServedFrom) GetTabletType() TabletType

func (*Keyspace_ServedFrom) ProtoMessage

func (*Keyspace_ServedFrom) ProtoMessage()

func (*Keyspace_ServedFrom) ProtoReflect

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

func (*Keyspace_ServedFrom) Reset

func (x *Keyspace_ServedFrom) Reset()

func (*Keyspace_ServedFrom) String

func (x *Keyspace_ServedFrom) String() string

type Shard

type Shard struct {

	// primary_alias is the tablet alias of the primary for the shard.
	// If it is unset, then there is no primary in this shard yet.
	// No lock is necessary to update this field, when for instance
	// TabletExternallyReparented updates this. However, we lock the
	// shard for reparenting operations (InitShardPrimary,
	// PlannedReparentShard,EmergencyReparentShard), to guarantee
	// exclusive operation.
	PrimaryAlias *TabletAlias `protobuf:"bytes,1,opt,name=primary_alias,json=primaryAlias,proto3" json:"primary_alias,omitempty"`
	// primary_term_start_time is the time (in UTC) at which the current term of
	// the primary specified in primary_alias began.
	//
	// A new primary term begins any time an authoritative decision is communicated
	// about which tablet should be the primary, such as via Vitess
	// replication-management commands like PlannedReparentShard,
	// EmergencyReparentShard, and TabletExternallyReparented.
	//
	// The primary_alias should only ever be changed if the new primary's term began
	// at a later time than this. Note that a new term can start for the tablet
	// that is already the primary. In that case, the primary_term_start_time would
	// be increased without changing the primary_alias.
	PrimaryTermStartTime *v18.Time `protobuf:"bytes,8,opt,name=primary_term_start_time,json=primaryTermStartTime,proto3" json:"primary_term_start_time,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"`
	// 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"`
	// 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"`
	// is_primary_serving sets whether this shard primary is serving traffic or not.
	// The keyspace lock is always taken when changing this.
	IsPrimaryServing bool `protobuf:"varint,7,opt,name=is_primary_serving,json=isPrimaryServing,proto3" json:"is_primary_serving,omitempty"`
	// contains filtered or unexported fields
}

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

func (*Shard) Descriptor deprecated

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

Deprecated: Use Shard.ProtoReflect.Descriptor instead.

func (*Shard) GetIsPrimaryServing

func (x *Shard) GetIsPrimaryServing() bool

func (*Shard) GetKeyRange

func (x *Shard) GetKeyRange() *KeyRange

func (*Shard) GetPrimaryAlias

func (x *Shard) GetPrimaryAlias() *TabletAlias

func (*Shard) GetPrimaryTermStartTime

func (x *Shard) GetPrimaryTermStartTime() *v18.Time

func (*Shard) GetSourceShards

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

func (*Shard) GetTabletControls

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

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 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"` // Disable query serving in this shard
	// contains filtered or unexported fields
}

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

func (*ShardReference) Descriptor deprecated

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

Deprecated: Use ShardReference.ProtoReflect.Descriptor instead.

func (*ShardReference) GetKeyRange

func (x *ShardReference) GetKeyRange() *KeyRange

func (*ShardReference) GetName

func (x *ShardReference) GetName() string

func (*ShardReference) ProtoMessage

func (*ShardReference) ProtoMessage()

func (*ShardReference) ProtoReflect

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

func (*ShardReference) Reset

func (x *ShardReference) Reset()

func (*ShardReference) String

func (x *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,proto3" json:"nodes,omitempty"`
	// contains filtered or unexported fields
}

ShardReplication describes the MySQL replication relationships whithin a cell.

func (*ShardReplication) Descriptor deprecated

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

Deprecated: Use ShardReplication.ProtoReflect.Descriptor instead.

func (*ShardReplication) GetNodes

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

func (*ShardReplication) ProtoMessage

func (*ShardReplication) ProtoMessage()

func (*ShardReplication) ProtoReflect

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

func (*ShardReplication) Reset

func (x *ShardReplication) Reset()

func (*ShardReplication) String

func (x *ShardReplication) String() string

type ShardReplicationError

type ShardReplicationError struct {

	// Type is the category of problem being fixed.
	Type ShardReplicationError_Type `protobuf:"varint,1,opt,name=type,proto3,enum=vitess.topodata.v18.ShardReplicationError_Type" json:"type,omitempty"`
	// TabletAlias is the tablet record that has the problem.
	TabletAlias *TabletAlias `protobuf:"bytes,2,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"`
	// contains filtered or unexported fields
}

ShardReplicationError describes the error being fixed by ShardReplicationFix.

func (*ShardReplicationError) Descriptor deprecated

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

Deprecated: Use ShardReplicationError.ProtoReflect.Descriptor instead.

func (*ShardReplicationError) GetTabletAlias

func (x *ShardReplicationError) GetTabletAlias() *TabletAlias

func (*ShardReplicationError) GetType

func (*ShardReplicationError) ProtoMessage

func (*ShardReplicationError) ProtoMessage()

func (*ShardReplicationError) ProtoReflect

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

func (*ShardReplicationError) Reset

func (x *ShardReplicationError) Reset()

func (*ShardReplicationError) String

func (x *ShardReplicationError) String() string

type ShardReplicationError_Type

type ShardReplicationError_Type int32
const (
	// UNKNOWN is not a valid value.
	ShardReplicationError_UNKNOWN ShardReplicationError_Type = 0
	// NOT_FOUND occurs when a tablet is in the ShardReplication record
	// but does not exist in the topology.
	ShardReplicationError_NOT_FOUND ShardReplicationError_Type = 1
	// TOPOLOGY_MISMATCH occurs when a tablet is in the replication graph and
	// exists in the topology, but at least one of the Keyspace, Shard, or Cell
	// fields for that tablet does not match the ShardReplication record.
	ShardReplicationError_TOPOLOGY_MISMATCH ShardReplicationError_Type = 2
)

func (ShardReplicationError_Type) Descriptor

func (ShardReplicationError_Type) Enum

func (ShardReplicationError_Type) EnumDescriptor deprecated

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

Deprecated: Use ShardReplicationError_Type.Descriptor instead.

func (ShardReplicationError_Type) Number

func (ShardReplicationError_Type) String

func (ShardReplicationError_Type) Type

type ShardReplication_Node

type ShardReplication_Node struct {
	TabletAlias *TabletAlias `protobuf:"bytes,1,opt,name=tablet_alias,json=tabletAlias,proto3" json:"tablet_alias,omitempty"`
	// contains filtered or unexported fields
}

Node describes a tablet instance within the cell

func (*ShardReplication_Node) Descriptor deprecated

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

Deprecated: Use ShardReplication_Node.ProtoReflect.Descriptor instead.

func (*ShardReplication_Node) GetTabletAlias

func (x *ShardReplication_Node) GetTabletAlias() *TabletAlias

func (*ShardReplication_Node) ProtoMessage

func (*ShardReplication_Node) ProtoMessage()

func (*ShardReplication_Node) ProtoReflect

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

func (*ShardReplication_Node) Reset

func (x *ShardReplication_Node) Reset()

func (*ShardReplication_Node) String

func (x *ShardReplication_Node) String() string

type ShardTabletControl

type ShardTabletControl 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"`
	// Disable query serving in this shard
	QueryServiceDisabled bool `protobuf:"varint,3,opt,name=query_service_disabled,json=queryServiceDisabled,proto3" json:"query_service_disabled,omitempty"`
	// contains filtered or unexported fields
}

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

func (*ShardTabletControl) Descriptor deprecated

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

Deprecated: Use ShardTabletControl.ProtoReflect.Descriptor instead.

func (*ShardTabletControl) GetKeyRange

func (x *ShardTabletControl) GetKeyRange() *KeyRange

func (*ShardTabletControl) GetName

func (x *ShardTabletControl) GetName() string

func (*ShardTabletControl) GetQueryServiceDisabled

func (x *ShardTabletControl) GetQueryServiceDisabled() bool

func (*ShardTabletControl) ProtoMessage

func (*ShardTabletControl) ProtoMessage()

func (*ShardTabletControl) ProtoReflect

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

func (*ShardTabletControl) Reset

func (x *ShardTabletControl) Reset()

func (*ShardTabletControl) String

func (x *ShardTabletControl) String() string

type Shard_SourceShard

type Shard_SourceShard struct {

	// Uid is the unique ID for this SourceShard object.
	Uid int32 `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"`
	// contains filtered or unexported fields
}

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

func (*Shard_SourceShard) Descriptor deprecated

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

Deprecated: Use Shard_SourceShard.ProtoReflect.Descriptor instead.

func (*Shard_SourceShard) GetKeyRange

func (x *Shard_SourceShard) GetKeyRange() *KeyRange

func (*Shard_SourceShard) GetKeyspace

func (x *Shard_SourceShard) GetKeyspace() string

func (*Shard_SourceShard) GetShard

func (x *Shard_SourceShard) GetShard() string

func (*Shard_SourceShard) GetTables

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

func (*Shard_SourceShard) GetUid

func (x *Shard_SourceShard) GetUid() int32

func (*Shard_SourceShard) ProtoMessage

func (*Shard_SourceShard) ProtoMessage()

func (*Shard_SourceShard) ProtoReflect

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

func (*Shard_SourceShard) Reset

func (x *Shard_SourceShard) Reset()

func (*Shard_SourceShard) String

func (x *Shard_SourceShard) String() string

type Shard_TabletControl

type Shard_TabletControl struct {

	// which tablet type is affected
	TabletType   TabletType `` /* 128-byte string literal not displayed */
	Cells        []string   `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
	DeniedTables []string   `protobuf:"bytes,4,rep,name=denied_tables,json=deniedTables,proto3" json:"denied_tables,omitempty"`
	// frozen is set if we've started failing over traffic for
	// the primary. If set, this record should not be removed.
	Frozen bool `protobuf:"varint,5,opt,name=frozen,proto3" json:"frozen,omitempty"`
	// contains filtered or unexported fields
}

TabletControl controls tablet's behavior

func (*Shard_TabletControl) Descriptor deprecated

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

Deprecated: Use Shard_TabletControl.ProtoReflect.Descriptor instead.

func (*Shard_TabletControl) GetCells

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

func (*Shard_TabletControl) GetDeniedTables

func (x *Shard_TabletControl) GetDeniedTables() []string

func (*Shard_TabletControl) GetFrozen

func (x *Shard_TabletControl) GetFrozen() bool

func (*Shard_TabletControl) GetTabletType

func (x *Shard_TabletControl) GetTabletType() TabletType

func (*Shard_TabletControl) ProtoMessage

func (*Shard_TabletControl) ProtoMessage()

func (*Shard_TabletControl) ProtoReflect

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

func (*Shard_TabletControl) Reset

func (x *Shard_TabletControl) Reset()

func (*Shard_TabletControl) String

func (x *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,proto3" json:"partitions,omitempty"`
	ServedFrom []*SrvKeyspace_ServedFrom        `protobuf:"bytes,4,rep,name=served_from,json=servedFrom,proto3" json:"served_from,omitempty"`
	// ThrottlerConfig has the configuration for the tablet server's
	// lag throttler, and applies to the entire keyspace, across all
	// shards and tablets. This is copied from the global keyspace
	// object.
	ThrottlerConfig *ThrottlerConfig `protobuf:"bytes,6,opt,name=throttler_config,json=throttlerConfig,proto3" json:"throttler_config,omitempty"`
	// contains filtered or unexported fields
}

SrvKeyspace is a rollup node for the keyspace itself.

func (*SrvKeyspace) Descriptor deprecated

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

Deprecated: Use SrvKeyspace.ProtoReflect.Descriptor instead.

func (*SrvKeyspace) GetPartitions

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

func (*SrvKeyspace) GetServedFrom

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

func (*SrvKeyspace) GetThrottlerConfig

func (x *SrvKeyspace) GetThrottlerConfig() *ThrottlerConfig

func (*SrvKeyspace) ProtoMessage

func (*SrvKeyspace) ProtoMessage()

func (*SrvKeyspace) ProtoReflect

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

func (*SrvKeyspace) Reset

func (x *SrvKeyspace) Reset()

func (*SrvKeyspace) String

func (x *SrvKeyspace) String() string

type SrvKeyspace_KeyspacePartition

type SrvKeyspace_KeyspacePartition struct {

	// The type this partition applies to.
	ServedType TabletType `` /* 128-byte string literal not displayed */
	// 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"`
	// List of shard tablet controls
	ShardTabletControls []*ShardTabletControl `protobuf:"bytes,3,rep,name=shard_tablet_controls,json=shardTabletControls,proto3" json:"shard_tablet_controls,omitempty"`
	// contains filtered or unexported fields
}

func (*SrvKeyspace_KeyspacePartition) Descriptor deprecated

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

Deprecated: Use SrvKeyspace_KeyspacePartition.ProtoReflect.Descriptor instead.

func (*SrvKeyspace_KeyspacePartition) GetServedType

func (x *SrvKeyspace_KeyspacePartition) GetServedType() TabletType

func (*SrvKeyspace_KeyspacePartition) GetShardReferences

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

func (*SrvKeyspace_KeyspacePartition) GetShardTabletControls

func (x *SrvKeyspace_KeyspacePartition) GetShardTabletControls() []*ShardTabletControl

func (*SrvKeyspace_KeyspacePartition) ProtoMessage

func (*SrvKeyspace_KeyspacePartition) ProtoMessage()

func (*SrvKeyspace_KeyspacePartition) ProtoReflect

func (*SrvKeyspace_KeyspacePartition) Reset

func (x *SrvKeyspace_KeyspacePartition) Reset()

func (*SrvKeyspace_KeyspacePartition) String

type SrvKeyspace_ServedFrom

type SrvKeyspace_ServedFrom struct {

	// the tablet type
	TabletType TabletType `` /* 128-byte string literal not displayed */
	// the keyspace name that's serving it
	Keyspace string `protobuf:"bytes,2,opt,name=keyspace,proto3" json:"keyspace,omitempty"`
	// contains filtered or unexported fields
}

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

func (*SrvKeyspace_ServedFrom) Descriptor deprecated

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

Deprecated: Use SrvKeyspace_ServedFrom.ProtoReflect.Descriptor instead.

func (*SrvKeyspace_ServedFrom) GetKeyspace

func (x *SrvKeyspace_ServedFrom) GetKeyspace() string

func (*SrvKeyspace_ServedFrom) GetTabletType

func (x *SrvKeyspace_ServedFrom) GetTabletType() TabletType

func (*SrvKeyspace_ServedFrom) ProtoMessage

func (*SrvKeyspace_ServedFrom) ProtoMessage()

func (*SrvKeyspace_ServedFrom) ProtoReflect

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

func (*SrvKeyspace_ServedFrom) Reset

func (x *SrvKeyspace_ServedFrom) Reset()

func (*SrvKeyspace_ServedFrom) String

func (x *SrvKeyspace_ServedFrom) String() string

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=vitess.topodata.v18.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"`
	// primary_term_start_time is the time (in UTC) at which the current term of
	// the current tablet began as primary. If this tablet is not currently the
	// primary, this value is ignored.
	//
	// A new primary term begins any time an authoritative decision is communicated
	// about which tablet should be the primary, such as via Vitess
	// replication-management commands like PlannedReparentShard,
	// EmergencyReparentShard, and TabletExternallyReparented.
	PrimaryTermStartTime *v18.Time `` /* 126-byte string literal not displayed */
	// default_conn_collation is the default connection collation used by this tablet.
	DefaultConnCollation uint32 `protobuf:"varint,16,opt,name=default_conn_collation,json=defaultConnCollation,proto3" json:"default_conn_collation,omitempty"`
	// contains filtered or unexported fields
}

Tablet represents information about a running instance of vttablet.

func (*Tablet) Descriptor deprecated

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

Deprecated: Use Tablet.ProtoReflect.Descriptor instead.

func (*Tablet) GetAlias

func (x *Tablet) GetAlias() *TabletAlias

func (*Tablet) GetDbNameOverride

func (x *Tablet) GetDbNameOverride() string

func (*Tablet) GetDefaultConnCollation

func (x *Tablet) GetDefaultConnCollation() uint32

func (*Tablet) GetHostname

func (x *Tablet) GetHostname() string

func (*Tablet) GetKeyRange

func (x *Tablet) GetKeyRange() *KeyRange

func (*Tablet) GetKeyspace

func (x *Tablet) GetKeyspace() string

func (*Tablet) GetMysqlHostname

func (x *Tablet) GetMysqlHostname() string

func (*Tablet) GetMysqlPort

func (x *Tablet) GetMysqlPort() int32

func (*Tablet) GetPortMap

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

func (*Tablet) GetPrimaryTermStartTime

func (x *Tablet) GetPrimaryTermStartTime() *v18.Time

func (*Tablet) GetShard

func (x *Tablet) GetShard() string

func (*Tablet) GetTags

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

func (*Tablet) GetType

func (x *Tablet) GetType() TabletType

func (*Tablet) ProtoMessage

func (*Tablet) ProtoMessage()

func (*Tablet) ProtoReflect

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

func (*Tablet) Reset

func (x *Tablet) Reset()

func (*Tablet) String

func (x *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,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"`
	// contains filtered or unexported fields
}

TabletAlias is a globally unique tablet identifier.

func (*TabletAlias) Descriptor deprecated

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

Deprecated: Use TabletAlias.ProtoReflect.Descriptor instead.

func (*TabletAlias) GetCell

func (x *TabletAlias) GetCell() string

func (*TabletAlias) GetUid

func (x *TabletAlias) GetUid() uint32

func (*TabletAlias) ProtoMessage

func (*TabletAlias) ProtoMessage()

func (*TabletAlias) ProtoReflect

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

func (*TabletAlias) Reset

func (x *TabletAlias) Reset()

func (*TabletAlias) String

func (x *TabletAlias) String() string

type TabletType

type TabletType int32

TabletType represents the type of a given tablet.

const (
	// UNKNOWN is not a valid value.
	TabletType_UNKNOWN TabletType = 0
	// PRIMARY is the primary server for the shard. Only PRIMARY allows DMLs.
	TabletType_PRIMARY TabletType = 1
	// DEPRECATED
	TabletType_MASTER TabletType = 1
	// REPLICA replicates from primary. It is used to serve live traffic.
	// A REPLICA can be promoted to PRIMARY. A demoted PRIMARY 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) Descriptor

func (TabletType) Descriptor() protoreflect.EnumDescriptor

func (TabletType) Enum

func (x TabletType) Enum() *TabletType

func (TabletType) EnumDescriptor deprecated

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

Deprecated: Use TabletType.Descriptor instead.

func (TabletType) Number

func (x TabletType) Number() protoreflect.EnumNumber

func (TabletType) String

func (x TabletType) String() string

func (TabletType) Type

type ThrottledAppRule

type ThrottledAppRule struct {

	// Name of the app to be throttled, e.g. "vreplication" or "online-ddl"
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Ratio defines how much the app should be throttled, range [0.0...1.0]. 1.0 means fully throttled. 0.0 means not throttled at all.
	// Negative values are reserved for a future implementation.
	Ratio float64 `protobuf:"fixed64,2,opt,name=ratio,proto3" json:"ratio,omitempty"`
	// ExpiresAt is the time at which the rule expires.
	ExpiresAt *v18.Time `protobuf:"bytes,3,opt,name=expires_at,json=expiresAt,proto3" json:"expires_at,omitempty"`
	// Exempt indicates the app should never be throttled, even if the throttler is, in general, throttling other apps.
	Exempt bool `protobuf:"varint,4,opt,name=exempt,proto3" json:"exempt,omitempty"`
	// contains filtered or unexported fields
}

ThrottledAppRule defines an app-specific throttling rule, with expiration.

func (*ThrottledAppRule) Descriptor deprecated

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

Deprecated: Use ThrottledAppRule.ProtoReflect.Descriptor instead.

func (*ThrottledAppRule) GetExempt

func (x *ThrottledAppRule) GetExempt() bool

func (*ThrottledAppRule) GetExpiresAt

func (x *ThrottledAppRule) GetExpiresAt() *v18.Time

func (*ThrottledAppRule) GetName

func (x *ThrottledAppRule) GetName() string

func (*ThrottledAppRule) GetRatio

func (x *ThrottledAppRule) GetRatio() float64

func (*ThrottledAppRule) ProtoMessage

func (*ThrottledAppRule) ProtoMessage()

func (*ThrottledAppRule) ProtoReflect

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

func (*ThrottledAppRule) Reset

func (x *ThrottledAppRule) Reset()

func (*ThrottledAppRule) String

func (x *ThrottledAppRule) String() string

type ThrottlerConfig

type ThrottlerConfig struct {

	// Enabled indicates that the throttler is actually checking state for
	// requests. When disabled, it automatically returns 200 OK for all
	// checks.
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Threshold is the threshold for either the default check (heartbeat
	// lag) or custom check.
	Threshold float64 `protobuf:"fixed64,2,opt,name=threshold,proto3" json:"threshold,omitempty"`
	// CustomQuery is an optional query that overrides the default check
	// query.
	CustomQuery string `protobuf:"bytes,3,opt,name=custom_query,json=customQuery,proto3" json:"custom_query,omitempty"`
	// CheckAsCheckSelf indicates whether a throttler /check request
	// should behave like a /check-self.
	CheckAsCheckSelf bool `protobuf:"varint,4,opt,name=check_as_check_self,json=checkAsCheckSelf,proto3" json:"check_as_check_self,omitempty"`
	// ThrottledApps is a map of rules for app-specific throttling
	ThrottledApps map[string]*ThrottledAppRule `` /* 188-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ThrottlerConfig) Descriptor deprecated

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

Deprecated: Use ThrottlerConfig.ProtoReflect.Descriptor instead.

func (*ThrottlerConfig) GetCheckAsCheckSelf

func (x *ThrottlerConfig) GetCheckAsCheckSelf() bool

func (*ThrottlerConfig) GetCustomQuery

func (x *ThrottlerConfig) GetCustomQuery() string

func (*ThrottlerConfig) GetEnabled

func (x *ThrottlerConfig) GetEnabled() bool

func (*ThrottlerConfig) GetThreshold

func (x *ThrottlerConfig) GetThreshold() float64

func (*ThrottlerConfig) GetThrottledApps

func (x *ThrottlerConfig) GetThrottledApps() map[string]*ThrottledAppRule

func (*ThrottlerConfig) ProtoMessage

func (*ThrottlerConfig) ProtoMessage()

func (*ThrottlerConfig) ProtoReflect

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

func (*ThrottlerConfig) Reset

func (x *ThrottlerConfig) Reset()

func (*ThrottlerConfig) String

func (x *ThrottlerConfig) String() string

type TopoConfig

type TopoConfig struct {
	TopoType string `protobuf:"bytes,1,opt,name=topo_type,json=topoType,proto3" json:"topo_type,omitempty"`
	Server   string `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
	Root     string `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"`
	// contains filtered or unexported fields
}

func (*TopoConfig) Descriptor deprecated

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

Deprecated: Use TopoConfig.ProtoReflect.Descriptor instead.

func (*TopoConfig) GetRoot

func (x *TopoConfig) GetRoot() string

func (*TopoConfig) GetServer

func (x *TopoConfig) GetServer() string

func (*TopoConfig) GetTopoType

func (x *TopoConfig) GetTopoType() string

func (*TopoConfig) ProtoMessage

func (*TopoConfig) ProtoMessage()

func (*TopoConfig) ProtoReflect

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

func (*TopoConfig) Reset

func (x *TopoConfig) Reset()

func (*TopoConfig) String

func (x *TopoConfig) String() string

Jump to

Keyboard shortcuts

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