vtgr

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VTGR

type VTGR struct {
	// Shards are all the shards that a VTGR is monitoring.
	// Caller can choose to iterate the shards to scan and repair for more granular control (e.g., stats report)
	// instead of calling ScanAndRepair() directly.
	Shards []*controller.GRShard
	// contains filtered or unexported fields
}

VTGR is the interface to manage the component to set up group replication with Vitess. The main goal of it is to reconcile MySQL group and the Vitess topology. Caller should use OpenTabletDiscovery to create the VTGR instance.

func OpenTabletDiscovery

func OpenTabletDiscovery(ctx context.Context, cellsToWatch, clustersToWatch []string) *VTGR

OpenTabletDiscovery calls OpenTabletDiscoveryWithAcitve and set the shard to be active it opens connection with topo server and triggers the first round of controller based on specified cells and keyspace/shards.

func OpenTabletDiscoveryWithAcitve

func OpenTabletDiscoveryWithAcitve(ctx context.Context, cellsToWatch, clustersToWatch []string, active bool) *VTGR

OpenTabletDiscoveryWithAcitve opens connection with topo server and triggers the first round of controller based on parameter

func (*VTGR) Diagnose

func (vtgr *VTGR) Diagnose(ctx context.Context, shard *controller.GRShard) (controller.DiagnoseType, error)

Diagnose exposes the endpoint to diagnose a particular shard

func (*VTGR) GetCurrentShardStatuses

func (vtgr *VTGR) GetCurrentShardStatuses() []controller.ShardStatus

GetCurrentShardStatuses is used when we want to know what VTGR observes it contains information about a list of instances and primary tablet

func (*VTGR) OverrideRebootstrapGroupSize added in v0.13.0

func (vtgr *VTGR) OverrideRebootstrapGroupSize(groupSize int) error

OverrideRebootstrapGroupSize forces an override the group size used in safety check for rebootstrap

func (*VTGR) RefreshCluster

func (vtgr *VTGR) RefreshCluster()

RefreshCluster get the latest tablets from topo server

func (*VTGR) Repair

Repair exposes the endpoint to repair a particular shard

func (*VTGR) ScanAndRepair

func (vtgr *VTGR) ScanAndRepair()

ScanAndRepair starts the scanAndFix routine

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.
external

Jump to

Keyboard shortcuts

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