Documentation ¶
Index ¶
- type Cell
- type Keyspace
- type Shard
- type Tablet
- type VitessCluster
- func (vc *VitessCluster) AddCell(t *testing.T, name string) (*Cell, error)
- func (vc *VitessCluster) AddKeyspace(t *testing.T, cell *Cell, ksName string, shards string, vschema string, ...) (*Keyspace, error)
- func (vc *VitessCluster) AddShards(t *testing.T, cell *Cell, keyspace *Keyspace, names string, numReplicas int, ...) error
- func (vc *VitessCluster) AddTablet(t *testing.T, cell *Cell, keyspace *Keyspace, shard *Shard, tabletType string, ...) (*Tablet, *exec.Cmd, error)
- func (vc *VitessCluster) DeleteShard(t *testing.T, cellName string, ksName string, shardName string)
- func (vc *VitessCluster) StartVtgate(t *testing.T, cell *Cell)
- func (vc *VitessCluster) TearDown()
- func (vc *VitessCluster) WaitForVReplicationToCatchup(vttablet *cluster.VttabletProcess, workflow string, database string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cell ¶
type Cell struct { Name string Keyspaces map[string]*Keyspace Vtgates []*cluster.VtgateProcess }
Cell represents a Vitess cell within the test cluster
type Tablet ¶
type Tablet struct { Name string Vttablet *cluster.VttabletProcess DbServer *cluster.MysqlctlProcess }
Tablet represents a vttablet within a shard
type VitessCluster ¶
type VitessCluster struct { Name string Cells map[string]*Cell Topo *cluster.TopoProcess Vtctld *cluster.VtctldProcess Vtctl *cluster.VtctlProcess VtctlClient *cluster.VtctlClientProcess }
VitessCluster represents all components within the test cluster
func InitCluster ¶
func InitCluster(t *testing.T, cellName string) *VitessCluster
InitCluster creates the global processes needed for a cluster
func NewVitessCluster ¶
func NewVitessCluster(name string) (cluster *VitessCluster, err error)
NewVitessCluster creates an entire VitessCluster for e2e testing
func (*VitessCluster) AddKeyspace ¶
func (vc *VitessCluster) AddKeyspace(t *testing.T, cell *Cell, ksName string, shards string, vschema string, schema string, numReplicas int, numRdonly int, tabletIDBase int) (*Keyspace, error)
AddKeyspace creates a keyspace with specified shard keys and number of replica/read-only tablets
func (*VitessCluster) AddShards ¶
func (vc *VitessCluster) AddShards(t *testing.T, cell *Cell, keyspace *Keyspace, names string, numReplicas int, numRdonly int, tabletIDBase int) error
AddShards creates shards given list of comma-separated keys with specified tablets in each shard
func (*VitessCluster) AddTablet ¶
func (vc *VitessCluster) AddTablet(t *testing.T, cell *Cell, keyspace *Keyspace, shard *Shard, tabletType string, tabletID int) (*Tablet, *exec.Cmd, error)
AddTablet creates new tablet with specified attributes
func (*VitessCluster) DeleteShard ¶
func (*VitessCluster) StartVtgate ¶
func (vc *VitessCluster) StartVtgate(t *testing.T, cell *Cell)
StartVtgate starts a vtgate process
func (*VitessCluster) TearDown ¶
func (vc *VitessCluster) TearDown()
TearDown brings down a cluster, deleting processes, removing topo keys
func (*VitessCluster) WaitForVReplicationToCatchup ¶
func (vc *VitessCluster) WaitForVReplicationToCatchup(vttablet *cluster.VttabletProcess, workflow string, database string, duration time.Duration) error
WaitForVReplicationToCatchup waits for "workflow" to finish copying