vttest

package
v0.0.13-beta02 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keyspace

type Keyspace struct {
	// name has to be unique in a VTTestTopology.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// shards inside this keyspace. Ignored if redirect is set.
	Shards []*Shard `protobuf:"bytes,2,rep,name=shards,proto3" json:"shards,omitempty"`
	// sharding_column_name for this keyspace. Used for v2 calls, but not for v3.
	ShardingColumnName string `protobuf:"bytes,3,opt,name=sharding_column_name,json=shardingColumnName,proto3" json:"sharding_column_name,omitempty"`
	// sharding_column_type for this keyspace. Used for v2 calls, but not for v3.
	ShardingColumnType string `protobuf:"bytes,4,opt,name=sharding_column_type,json=shardingColumnType,proto3" json:"sharding_column_type,omitempty"`
	// redirects all traffic to another keyspace. If set, shards is ignored.
	ServedFrom string `protobuf:"bytes,5,opt,name=served_from,json=servedFrom,proto3" json:"served_from,omitempty"`
	// number of replica tablets to instantiate. This includes the master tablet.
	ReplicaCount int32 `protobuf:"varint,6,opt,name=replica_count,json=replicaCount,proto3" json:"replica_count,omitempty"`
	// number of rdonly tablets to instantiate.
	RdonlyCount          int32    `protobuf:"varint,7,opt,name=rdonly_count,json=rdonlyCount,proto3" json:"rdonly_count,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Keyspace describes a single keyspace.

func (*Keyspace) Descriptor

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

func (*Keyspace) GetName

func (m *Keyspace) GetName() string

func (*Keyspace) GetRdonlyCount

func (m *Keyspace) GetRdonlyCount() int32

func (*Keyspace) GetReplicaCount

func (m *Keyspace) GetReplicaCount() int32

func (*Keyspace) GetServedFrom

func (m *Keyspace) GetServedFrom() string

func (*Keyspace) GetShardingColumnName

func (m *Keyspace) GetShardingColumnName() string

func (*Keyspace) GetShardingColumnType

func (m *Keyspace) GetShardingColumnType() string

func (*Keyspace) GetShards

func (m *Keyspace) GetShards() []*Shard

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 (m *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 Shard

type Shard struct {
	// name has to be unique in a keyspace. For unsharded keyspaces, it
	// should be '0'. For sharded keyspace, it should be derived from
	// the keyrange, like '-80' or '40-80'.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// db_name_override is the mysql db name for this shard. Has to be
	// globally unique. If not specified, we will by default use
	// 'vt_<keyspace>_<shard>'.
	DbNameOverride       string   `protobuf:"bytes,2,opt,name=db_name_override,json=dbNameOverride,proto3" json:"db_name_override,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Shard describes a single shard in a keyspace.

func (*Shard) Descriptor

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

func (*Shard) GetDbNameOverride

func (m *Shard) GetDbNameOverride() string

func (*Shard) GetName

func (m *Shard) GetName() string

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 (m *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 VTTestTopology

type VTTestTopology struct {
	// all keyspaces in the topology.
	Keyspaces []*Keyspace `protobuf:"bytes,1,rep,name=keyspaces,proto3" json:"keyspaces,omitempty"`
	// list of cells the keyspaces reside in. Vtgate is started in only the first cell.
	Cells                []string `protobuf:"bytes,2,rep,name=cells,proto3" json:"cells,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

VTTestTopology describes the keyspaces in the topology.

func (*VTTestTopology) Descriptor

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

func (*VTTestTopology) GetCells

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

func (*VTTestTopology) GetKeyspaces

func (m *VTTestTopology) GetKeyspaces() []*Keyspace

func (*VTTestTopology) ProtoMessage

func (*VTTestTopology) ProtoMessage()

func (*VTTestTopology) Reset

func (m *VTTestTopology) Reset()

func (*VTTestTopology) String

func (m *VTTestTopology) String() string

func (*VTTestTopology) XXX_DiscardUnknown

func (m *VTTestTopology) XXX_DiscardUnknown()

func (*VTTestTopology) XXX_Marshal

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

func (*VTTestTopology) XXX_Merge

func (m *VTTestTopology) XXX_Merge(src proto.Message)

func (*VTTestTopology) XXX_Size

func (m *VTTestTopology) XXX_Size() int

func (*VTTestTopology) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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