Documentation ¶
Index ¶
- type VTGR
- func (vtgr *VTGR) Diagnose(ctx context.Context, shard *controller.GRShard) (controller.DiagnoseType, error)
- func (vtgr *VTGR) GetCurrentShardStatuses() []controller.ShardStatus
- func (vtgr *VTGR) OverrideRebootstrapGroupSize(groupSize int) error
- func (vtgr *VTGR) RefreshCluster()
- func (vtgr *VTGR) Repair(ctx context.Context, shard *controller.GRShard, ...) (controller.RepairResultCode, error)
- func (vtgr *VTGR) ScanAndRepair()
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 ¶
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
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 ¶
func (vtgr *VTGR) Repair(ctx context.Context, shard *controller.GRShard, diagnose controller.DiagnoseType) (controller.RepairResultCode, error)
Repair exposes the endpoint to repair a particular shard
func (*VTGR) ScanAndRepair ¶
func (vtgr *VTGR) ScanAndRepair()
ScanAndRepair starts the scanAndFix routine