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.
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.
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.
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
- Variables
- func AcknowledgeAllRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func AcknowledgeClusterRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func AcknowledgeInstanceRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func AcknowledgeRecovery(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ActiveClusterRecovery(params martini.Params, r render.Render, req *http.Request)
- func AgentHealthCheck(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func AllInstances(params martini.Params, r render.Render, req *http.Request)
- func AsyncDiscover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Audit(params martini.Params, r render.Render, req *http.Request)
- func AuditFailureDetection(params martini.Params, r render.Render, req *http.Request)
- func AuditRecovery(params martini.Params, r render.Render, req *http.Request)
- func AuditRecoverySteps(params martini.Params, r render.Render, req *http.Request)
- func AutomatedRecoveryFilters(params martini.Params, r render.Render, req *http.Request)
- func BackendQueryMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func BackendQueryMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func BeginDowntime(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func BeginMaintenance(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func BlockedRecoveries(params martini.Params, r render.Render, req *http.Request)
- func BulkInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func BulkPromotionRules(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func CacheHit(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func CanReplicateFrom(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Check(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func CheckGlobalRecoveries(params martini.Params, r render.Render, req *http.Request)
- func Cluster(params martini.Params, r render.Render, req *http.Request)
- func ClusterByAlias(params martini.Params, r render.Render, req *http.Request)
- func ClusterByInstance(params martini.Params, r render.Render, req *http.Request)
- func ClusterInfo(params martini.Params, r render.Render, req *http.Request)
- func ClusterInfoByAlias(params martini.Params, r render.Render, req *http.Request)
- func ClusterMaster(params martini.Params, r render.Render, req *http.Request)
- func Clusters(params martini.Params, r render.Render, req *http.Request)
- func ClustersInfo(params martini.Params, r render.Render, req *http.Request)
- func CustomMartini() *martini.ClassicMartini
- func DelayReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DeregisterHostnameUnresolve(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DetachReplicaMasterHost(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DisableGlobalRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DisableSemiSyncMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DisableSemiSyncReplica(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Discover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DiscoveryMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DiscoveryMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DiscoveryQueueMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func DiscoveryQueueMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Downtimed(params martini.Params, r render.Render, req *http.Request)
- func EnableGlobalRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func EnableSemiSyncMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func EnableSemiSyncReplica(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func EndDowntime(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func EndMaintenance(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func EndMaintenanceByInstanceKey(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ForceMasterFailover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ForceMasterTakeover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Forget(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ForgetCluster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func GetHeuristicClusterPoolInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func GetHeuristicClusterPoolInstancesLag(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func GrabElection(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func GracefulMasterTakeover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func GracefulMasterTakeoverAuto(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Headers(params martini.Params, r render.Render, req *http.Request)
- func Health(params martini.Params, r render.Render, req *http.Request)
- func HostnameResolveCache(params martini.Params, r render.Render, req *http.Request)
- func Http(continuousDiscovery bool)
- func InMaintenance(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func InfoSync(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Instance(params martini.Params, r render.Render, req *http.Request)
- func InstanceReplicas(params martini.Params, r render.Render, req *http.Request)
- func KillQuery(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func LBCheck(params martini.Params, r render.Render, req *http.Request)
- func LeaderCheck(params martini.Params, r render.Render, req *http.Request)
- func ListAPI(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Maintenance(params martini.Params, r render.Render, req *http.Request)
- func MakeCoMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MakeLocalMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MakeMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Masters(params martini.Params, r render.Render, req *http.Request)
- func MatchBelow(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MatchUp(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MatchUpReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MoveBelow(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MoveEquivalent(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MoveUp(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MoveUpReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func MultiMatchReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Problems(params martini.Params, r render.Render, req *http.Request)
- func RaftAddPeer(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftFollowerHealthReport(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftHealth(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftLeader(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftPeers(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftRemovePeer(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftSnapshot(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftState(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftStatus(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftYield(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RaftYieldHint(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReadClusterPoolInstancesMap(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReadReplicationAnalysisChangelog(params martini.Params, r render.Render, req *http.Request)
- func ReattachReplicaMasterHost(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RecentlyActiveClusterRecovery(params martini.Params, r render.Render, req *http.Request)
- func RecentlyActiveInstanceRecovery(params martini.Params, r render.Render, req *http.Request)
- func Recover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RecoverLite(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Reelect(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Refresh(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RegisterAPIRequest(method string, httpApi *dtstruct.HttpAPI, m *martini.ClassicMartini, ...)
- func RegisterCandidate(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RegisterHostnameUnresolve(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RegisterRequests(httpApi *dtstruct.HttpAPI, m *martini.ClassicMartini)
- func RegroupReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReloadClusterAlias(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReloadConfiguration(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RelocateBelow(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RelocateReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReplicationAnalysis(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReplicationAnalysisForCluster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ReplicationAnalysisForKey(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func RepointReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ResetHostnameResolveCache(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func ResetReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Resolve(params martini.Params, r render.Render, req *http.Request)
- func RestartReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Search(params martini.Params, r render.Render, req *http.Request)
- func SetClusterAliasManualOverride(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func SetReadOnly(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func SetWriteable(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func SkipQuery(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func StartReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func StatusCheck(params martini.Params, r render.Render, req *http.Request)
- func StopReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func StopReplicationNicely(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func SubmitMastersToKvStores(params martini.Params, r render.Render, req *http.Request)
- func SubmitPoolInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Tag(params martini.Params, r render.Render, req *http.Request)
- func TagValue(params martini.Params, r render.Render, req *http.Request)
- func Tagged(params martini.Params, r render.Render, req *http.Request)
- func Tags(params martini.Params, r render.Render, req *http.Request)
- func TakeMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func TakeSiblings(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Topology(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func TopologySnapshot(params martini.Params, r render.Render, req *http.Request)
- func TopologyTabulated(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func TopologyWithTag(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func Untag(params martini.Params, r render.Render, req *http.Request)
- func UntagAll(params martini.Params, r render.Render, req *http.Request)
- func Verify(r *nethttp.Request, validOUs []string) error
- func VerifyOUs(validOUs []string) martini.Handler
- func WriteBufferMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func WriteBufferMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)
- type HttpWeb
- func (this *HttpWeb) About(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) AccessToken(params martini.Params, r render.Render, req *http.Request, ...)
- func (this *HttpWeb) Agent(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) AgentSeedDetails(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Agents(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Audit(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) AuditFailureDetection(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) AuditRecovery(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Cluster(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) ClusterByAlias(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) ClusterByInstance(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) ClusterPools(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Clusters(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) ClustersAnalysis(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Discover(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) FAQ(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Home(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Index(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) KeepCalm(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) RegisterDebug(m *martini.ClassicMartini)
- func (this *HttpWeb) RegisterRequests(m *martini.ClassicMartini)
- func (this *HttpWeb) Search(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Seeds(params martini.Params, r render.Render, req *http.Request, user auth.User)
- func (this *HttpWeb) Status(params martini.Params, r render.Render, req *http.Request, user auth.User)
Constants ¶
const TimeFormat = "2006-01-02 15:04:05"
Variables ¶
var API = dtstruct.HttpAPI{}
var Web = HttpWeb{}
Functions ¶
func AcknowledgeAllRecoveries ¶
func AcknowledgeAllRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
ClusterInfo provides details of a given cluster
func AcknowledgeClusterRecoveries ¶
func AcknowledgeClusterRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
ClusterInfo provides details of a given cluster
func AcknowledgeInstanceRecoveries ¶
func AcknowledgeInstanceRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
ClusterInfo provides details of a given cluster
func AcknowledgeRecovery ¶
ClusterInfo provides details of a given cluster
func ActiveClusterRecovery ¶
ActiveClusterRecovery returns recoveries in-progress for a given cluster
func AgentHealthCheck ¶
Agent returns complete information of a given agent
func AllInstances ¶
AllInstances lists all known instances
func AsyncDiscover ¶
AsyncDiscover issues an asynchronous read on an instance. This is useful for bulk loads of a new set of instances and will not block if the instance is slow to respond or not reachable.
func AuditFailureDetection ¶
AuditFailureDetection provides list of tham_opology_failure_detection entries
func AuditRecovery ¶
AuditRecovery provides list of topology-recovery entries
func AuditRecoverySteps ¶
AuditRecoverySteps returns audited steps of a given recovery
func AutomatedRecoveryFilters ¶
AutomatedRecoveryFilters retuens list of clusters which are configured with automated recovery
func BackendQueryMetricsRaw ¶
func BackendQueryMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)
BackendQueryMetricsRaw returns the raw backend query metric
func BeginDowntime ¶
BeginDowntime sets a downtime flag with default duration
func BeginMaintenance ¶
BeginMaintenance begins maintenance mode for given instance
func BlockedRecoveries ¶
BlockedRecoveries reads list of currently blocked recoveries, optionally filtered by cluster name
func BulkInstances ¶
BulkInstances returns a list of all known instances
func BulkPromotionRules ¶
BulkPromotionRules returns a list of the known promotion rules for each instance
func CanReplicateFrom ¶
CanReplicateFrom attempts to move an instance below another via pseudo GTID matching of binlog entries
func CheckGlobalRecoveries ¶
CheckGlobalRecoveries checks whether
func ClusterByAlias ¶
ClusterByAlias provides list of instances in given cluster
func ClusterByInstance ¶
ClusterByInstance provides list of instances in cluster an instance belongs to
func ClusterInfo ¶
ClusterInfo provides details of a given cluster
func ClusterInfoByAlias ¶
Cluster provides list of instances in given cluster
func ClusterMaster ¶
ClusterMaster returns the writable master of a given cluster
func ClustersInfo ¶
ClustersInfo provides list of known clusters, along with some added metadata per cluster
func DelayReplication ¶
DelayReplication delays replication on given instance with given seconds
func DeregisterHostnameUnresolve ¶
func DeregisterHostnameUnresolve(params martini.Params, r render.Render, req *http.Request, user auth.User)
DeregisterHostnameUnresolve deregisters the unresolve name used previously
func DetachReplicaMasterHost ¶
func DetachReplicaMasterHost(params martini.Params, r render.Render, req *http.Request, user auth.User)
DetachReplicaMasterHost detaches a replica from its master by setting an invalid (yet revertible) host name
func DisableGlobalRecoveries ¶
func DisableGlobalRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
DisableGlobalRecoveries globally disables recoveries
func DisableSemiSyncMaster ¶
func DisableSemiSyncReplica ¶
func DiscoveryMetricsAggregated ¶
func DiscoveryMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)
DiscoveryMetricsAggregated will return a single set of aggregated metric for raw values collected since the specified time.
func DiscoveryMetricsRaw ¶
DiscoveryMetricsRaw will return the last X seconds worth of discovery information in time based order as a JSON array
func DiscoveryQueueMetricsAggregated ¶
func DiscoveryQueueMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)
DiscoveryQueueMetricsAggregated returns a single value showing the metric of the discovery queue over the last N seconds. This is expected to be called every 60 seconds (?) and the config setting of the retention period is currently hard-coded. See go/discovery/ for more information.
func DiscoveryQueueMetricsRaw ¶
func DiscoveryQueueMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)
DiscoveryQueueMetricsRaw returns the raw queue metric (active and queued values), data taken secondly for the last N seconds.
func EnableGlobalRecoveries ¶
func EnableGlobalRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)
EnableGlobalRecoveries globally enables recoveries
func EnableSemiSyncMaster ¶
func EnableSemiSyncReplica ¶
func EndDowntime ¶
EndDowntime terminates downtime (removes downtime flag) for an instance
func EndMaintenance ¶
EndMaintenance terminates maintenance mode
func EndMaintenanceByInstanceKey ¶
func EndMaintenanceByInstanceKey(params martini.Params, r render.Render, req *http.Request, user auth.User)
EndMaintenanceByInstanceKey terminates maintenance mode for given instance
func ForceMasterFailover ¶
ForceMasterFailover fails over a master (even if there's no particular problem with the master)
func ForceMasterTakeover ¶
ForceMasterTakeover fails over a master (even if there's no particular problem with the master)
func ForgetCluster ¶
ForgetCluster forgets all instacnes of a cluster
func GetHeuristicClusterPoolInstances ¶
func GetHeuristicClusterPoolInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)
GetHeuristicClusterPoolInstances returns instances belonging to a cluster's pool
func GetHeuristicClusterPoolInstancesLag ¶
func GetHeuristicClusterPoolInstancesLag(params martini.Params, r render.Render, req *http.Request, user auth.User)
GetHeuristicClusterPoolInstances returns instances belonging to a cluster's pool
func GrabElection ¶
GrabElection forcibly grabs leadership. Use with care!!
func GracefulMasterTakeover ¶
func GracefulMasterTakeover(params martini.Params, r render.Render, req *http.Request, user auth.User)
GracefulMasterTakeover gracefully fails over a master, either: - onto its single replica, or - onto a replica indicated by the user
func GracefulMasterTakeoverAuto ¶
func GracefulMasterTakeoverAuto(params martini.Params, r render.Render, req *http.Request, user auth.User)
GracefulMasterTakeoverAuto gracefully fails over a master onto a replica of ham4db's choosing
func HostnameResolveCache ¶
HostnameResolveCache shows content of in-memory hostname cache
func InMaintenance ¶
EndMaintenanceByInstanceKey terminates maintenance mode for given instance
func InstanceReplicas ¶
InstanceReplicas lists all replicas of given instance
func LBCheck ¶
LBCheck returns a constant respnse, and this can be used by load balancers that expect a given string.
func LeaderCheck ¶
LBCheck returns a constant respnse, and this can be used by load balancers that expect a given string.
func Maintenance ¶
Maintenance provides list of instance under active maintenance
func MakeCoMaster ¶
MakeCoMaster attempts to make an instance co-master with its own master
func MakeLocalMaster ¶
MakeLocalMaster attempts to make the given instance a local master: take over its master by enslaving its siblings and replicating from its grandparent.
func MakeMaster ¶
MakeMaster attempts to make the given instance a master, and match its siblings to be its replicas
func MatchBelow ¶
MatchBelow attempts to move an instance below another via pseudo GTID matching of binlog entries
func MatchUp ¶
MatchBelow attempts to move an instance below another via pseudo GTID matching of binlog entries
func MatchUpReplicas ¶
MatchUpReplicas attempts to match up all replicas of an instance
func MoveEquivalent ¶
MoveEquivalent attempts to move an instance below another, baseed on known equivalence master coordinates
func MoveUpReplicas ¶
MoveUpReplicas attempts to move up all replicas of an instance
func MultiMatchReplicas ¶
MultiMatchReplicas attempts to match all replicas of a given instance below another, efficiently
func RaftAddPeer ¶
RaftAddPeer adds a new node to the raft cluster
func RaftFollowerHealthReport ¶
func RaftFollowerHealthReport(params martini.Params, r render.Render, req *http.Request, user auth.User)
RaftFollowerHealthReport is initiated by followers to report their identity and health to the raft leader.
func RaftHealth ¶
RaftHealth indicates whether this node is part of a healthy raft group
func RaftLeader ¶
RaftLeader returns the identify of the leader, if possible
func RaftRemovePeer ¶
RaftAddPeer removes a node fro the raft cluster
func RaftSnapshot ¶
RaftSnapshot instructs raft to take a snapshot
func RaftStatus ¶
RaftStatus exports a status summary for a raft node
func RaftYieldHint ¶
RaftYieldHint yields to a host whose name contains given hint (e.g. DC)
func ReadClusterPoolInstancesMap ¶
func ReadClusterPoolInstancesMap(params martini.Params, r render.Render, req *http.Request, user auth.User)
SubmitPoolHostnames (re-)applies the list of hostnames for a given pool
func ReadReplicationAnalysisChangelog ¶
ReadReplicationAnalysisChangelog lists instances and their analysis changelog
func ReattachReplicaMasterHost ¶
func ReattachReplicaMasterHost(params martini.Params, r render.Render, req *http.Request, user auth.User)
ReattachReplicaMasterHost reverts a detachReplicaMasterHost command by resoting the original master hostname in CHANGE MASTER TO
func RecentlyActiveClusterRecovery ¶
RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster
func RecentlyActiveInstanceRecovery ¶
RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster
func RecoverLite ¶
RecoverLite attempts recovery on a given instance, without executing external processes
func RegisterAPIRequest ¶
func RegisterAPIRequest(method string, httpApi *dtstruct.HttpAPI, m *martini.ClassicMartini, isTypePre bool, path string, handler martini.Handler)
RegisterAPIRequest register api with proxy
func RegisterCandidate ¶
Registers promotion preference for given instance
func RegisterHostnameUnresolve ¶
func RegisterHostnameUnresolve(params martini.Params, r render.Render, req *http.Request, user auth.User)
RegisterHostnameUnresolve registers the unresolve name to use
func RegisterRequests ¶
func RegisterRequests(httpApi *dtstruct.HttpAPI, m *martini.ClassicMartini)
RegisterRequests makes for the de-facto list of known API calls
func RegroupReplicas ¶
RegroupReplicas attempts to pick a replica of a given instance and make it take its siblings, using any method possible (GTID, Pseudo-GTID, binlog servers)
func ReloadClusterAlias ¶
ReloadClusterAlias clears in-memory hostname resovle cache
func ReloadConfiguration ¶
ReloadConfiguration reloads confiug settings (not all of which will apply after change)
func RelocateBelow ¶
RelocateBelow attempts to move an instance below another, ham4db choosing the best (potentially multi-step) relocation method
func RelocateReplicas ¶
Relocates attempts to smartly relocate replicas of a given instance below another
func ReplicationAnalysis ¶
ReplicationAnalysis return list of issues
func ReplicationAnalysisForCluster ¶
func ReplicationAnalysisForCluster(params martini.Params, r render.Render, req *http.Request, user auth.User)
ReplicationAnalysis retuens list of issues
func ReplicationAnalysisForKey ¶
func ReplicationAnalysisForKey(params martini.Params, r render.Render, req *http.Request, user auth.User)
ReplicationAnalysis return list of issues
func RepointReplicas ¶
MoveUpReplicas attempts to move up all replicas of an instance
func ResetHostnameResolveCache ¶
func ResetHostnameResolveCache(params martini.Params, r render.Render, req *http.Request, user auth.User)
ResetHostnameResolveCache clears in-memory hostname resovle cache
func ResetReplication ¶
ResetReplication makes a replica forget about its master, effectively breaking the replication
func Resolve ¶
Resolve tries to resolve hostname and then checks to see if port is open on that host.
func RestartReplication ¶
RestartReplication stops & starts replication on given instance
func SetClusterAliasManualOverride ¶
func SetClusterAliasManualOverride(params martini.Params, r render.Render, req *http.Request, user auth.User)
SetClusterAlias will change an alias for a given clustername
func SetReadOnly ¶
SetReadOnly sets the global read_only variable
func SetWriteable ¶
SetWriteable clear the global read_only variable
func StartReplication ¶
StartReplication starts replication on given instance
func StatusCheck ¶
A configurable endpoint that can be for regular status checks or whatever. While similar to Health() this returns 500 on failure. This will prevent issues for those that have come to expect a 200 It might be a good idea to deprecate the current Health() behavior and roll this in at some point
func StopReplication ¶
StopReplication stops replication on given instance
func StopReplicationNicely ¶
func StopReplicationNicely(params martini.Params, r render.Render, req *http.Request, user auth.User)
StopReplicationNicely stops replication on given instance, such that sql thead is aligned with IO thread
func SubmitMastersToKvStores ¶
Write a cluster's master (or all clusters masters) to kv stores. This should generally only happen once in a lifetime of a cluster. Otherwise KV stores are updated via failovers.
func SubmitPoolInstances ¶
SubmitPoolInstances (re-)applies the list of hostnames for a given pool
func TakeMaster ¶
TakeMaster
func TakeSiblings ¶
TakeSiblings
func TopologySnapshot ¶
TopologySnapshot triggers ham4db to record a snapshot of host/master for all known hosts.
func TopologyTabulated ¶
TopologyTabulated returns an graph of cluster's instances
func TopologyWithTag ¶
TopologyWithTag returns an graph of cluster's instances and instance tags
Types ¶
type HttpWeb ¶
type HttpWeb struct {
URLPrefix string
}
HttpWeb is the web requests server, mapping each request to a web page
func (*HttpWeb) AccessToken ¶
func (*HttpWeb) AgentSeedDetails ¶
func (*HttpWeb) AuditFailureDetection ¶
func (*HttpWeb) AuditRecovery ¶
func (*HttpWeb) ClusterByAlias ¶
func (*HttpWeb) ClusterByInstance ¶
func (*HttpWeb) ClusterPools ¶
func (*HttpWeb) ClustersAnalysis ¶
func (*HttpWeb) RegisterDebug ¶
func (this *HttpWeb) RegisterDebug(m *martini.ClassicMartini)
RegisterDebug adds handlers for /debug/vars (expvar) and /debug/pprof (net/http/pprof) support
func (*HttpWeb) RegisterRequests ¶
func (this *HttpWeb) RegisterRequests(m *martini.ClassicMartini)
RegisterRequests makes for the de-facto list of known Web calls