replication

package
v0.0.0-...-6b32d26 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Copyright 2021 SANGFOR TECHNOLOGIES

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanReplicateFrom

func CanReplicateFrom(first dtstruct.InstanceAdaptor, other dtstruct.InstanceAdaptor) (bool, error)

CanReplicateFrom check if first instance can practically replicate from other instance

func DelayReplication

func DelayReplication(instanceKey *dtstruct.InstanceKey, seconds int) error

DelayReplication set the replication delay given seconds on the given instance

func GetReplicationAnalysis

func GetReplicationAnalysis(dbt string, clusterName, clusterId string, hints *dtstruct.ReplicationAnalysisHints) ([]dtstruct.ReplicationAnalysis, error)

GetReplicationAnalysis will check for replication problems (dead master; unreachable master; etc)

func ResetReplication

func ResetReplication(instanceKey *dtstruct.InstanceKey) (dtstruct.InstanceAdaptor, error)

ResetReplication will reset a replica's replication

func RestartReplication

func RestartReplication(instanceKey *dtstruct.InstanceKey) (detail interface{}, err error)

RestartReplication stop & start replication on the given instance

func SetReadOnly

func SetReadOnly(instanceKey *dtstruct.InstanceKey, readOnly bool) (dtstruct.InstanceAdaptor, error)

SetReadOnly set or clear the instance's read only setting

func SetSemiSyncOnDownstream

func SetSemiSyncOnDownstream(instanceKey *dtstruct.InstanceKey, enable bool) (dtstruct.InstanceAdaptor, error)

SetSemiSyncOnDownstream enable or disable semi sync replication on the downstream instance

func SetSemiSyncOnUpstream

func SetSemiSyncOnUpstream(instanceKey *dtstruct.InstanceKey, enable bool) (dtstruct.InstanceAdaptor, error)

SetSemiSyncOnUpstream enable or disable semi sync replication on the upstream instance

func StartReplication

func StartReplication(instanceKey *dtstruct.InstanceKey) (interface{}, error)

StartReplication start replication on the given instance.

func StopReplication

func StopReplication(instanceKey *dtstruct.InstanceKey) (interface{}, error)

StopReplication stop replication on the given instance

func StopReplicationNicely

func StopReplicationNicely(instanceKey *dtstruct.InstanceKey, timeout time.Duration) (dtstruct.InstanceAdaptor, error)

StopReplicationNicely stop a replica, wait until all log be consumed, ensure that data is not lost as much as possible

Types

This section is empty.

Jump to

Keyboard shortcuts

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