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 ¶
- func CanReplicateFrom(first dtstruct.InstanceAdaptor, other dtstruct.InstanceAdaptor) (bool, error)
- func DelayReplication(instanceKey *dtstruct.InstanceKey, seconds int) error
- func GetReplicationAnalysis(dbt string, clusterName, clusterId string, ...) ([]dtstruct.ReplicationAnalysis, error)
- func ResetReplication(instanceKey *dtstruct.InstanceKey) (dtstruct.InstanceAdaptor, error)
- func RestartReplication(instanceKey *dtstruct.InstanceKey) (detail interface{}, err error)
- func SetReadOnly(instanceKey *dtstruct.InstanceKey, readOnly bool) (dtstruct.InstanceAdaptor, error)
- func SetSemiSyncOnDownstream(instanceKey *dtstruct.InstanceKey, enable bool) (dtstruct.InstanceAdaptor, error)
- func SetSemiSyncOnUpstream(instanceKey *dtstruct.InstanceKey, enable bool) (dtstruct.InstanceAdaptor, error)
- func StartReplication(instanceKey *dtstruct.InstanceKey) (interface{}, error)
- func StopReplication(instanceKey *dtstruct.InstanceKey) (interface{}, error)
- func StopReplicationNicely(instanceKey *dtstruct.InstanceKey, timeout time.Duration) (dtstruct.InstanceAdaptor, error)
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.