http

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTTPWeb = Web{}
View Source
var HTTPapi = API{}

Functions

func Respond

func Respond(r render.Render, apiResponse *APIResponse)

Types

type API

type API struct {
	URLPrefix string
}

func (*API) ASCIITopology added in v0.13.0

func (httpAPI *API) ASCIITopology(params martini.Params, r render.Render, req *http.Request)

ASCIITopology returns an ascii graph of cluster's instances

func (*API) ASCIITopologyTabulated added in v0.13.0

func (httpAPI *API) ASCIITopologyTabulated(params martini.Params, r render.Render, req *http.Request)

ASCIITopologyTabulated returns an ascii graph of cluster's instances

func (*API) ASCIITopologyTags added in v0.13.0

func (httpAPI *API) ASCIITopologyTags(params martini.Params, r render.Render, req *http.Request)

ASCIITopologyTags returns an ascii graph of cluster's instances and instance tags

func (*API) AcknowledgeAllRecoveries added in v0.13.0

func (httpAPI *API) AcknowledgeAllRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)

ClusterInfo provides details of a given cluster

func (*API) AcknowledgeClusterRecoveries added in v0.13.0

func (httpAPI *API) AcknowledgeClusterRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)

ClusterInfo provides details of a given cluster

func (*API) AcknowledgeInstanceRecoveries added in v0.13.0

func (httpAPI *API) AcknowledgeInstanceRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)

ClusterInfo provides details of a given cluster

func (*API) AcknowledgeRecovery added in v0.13.0

func (httpAPI *API) AcknowledgeRecovery(params martini.Params, r render.Render, req *http.Request, user auth.User)

ClusterInfo provides details of a given cluster

func (*API) ActiveClusterRecovery added in v0.13.0

func (httpAPI *API) ActiveClusterRecovery(params martini.Params, r render.Render, req *http.Request)

ActiveClusterRecovery returns recoveries in-progress for a given cluster

func (*API) AllInstances added in v0.13.0

func (httpAPI *API) AllInstances(params martini.Params, r render.Render, req *http.Request)

AllInstances lists all known instances

func (*API) AsyncDiscover added in v0.13.0

func (httpAPI *API) AsyncDiscover(params martini.Params, r render.Render, req *http.Request, user auth.User)

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 (*API) Audit added in v0.13.0

func (httpAPI *API) Audit(params martini.Params, r render.Render, req *http.Request)

Audit provides list of audit entries by given page number

func (*API) AuditFailureDetection added in v0.13.0

func (httpAPI *API) AuditFailureDetection(params martini.Params, r render.Render, req *http.Request)

AuditFailureDetection provides list of topology_failure_detection entries

func (*API) AuditRecovery added in v0.13.0

func (httpAPI *API) AuditRecovery(params martini.Params, r render.Render, req *http.Request)

AuditRecovery provides list of topology-recovery entries

func (*API) AuditRecoverySteps added in v0.13.0

func (httpAPI *API) AuditRecoverySteps(params martini.Params, r render.Render, req *http.Request)

AuditRecoverySteps returns audited steps of a given recovery

func (*API) AutomatedRecoveryFilters added in v0.13.0

func (httpAPI *API) AutomatedRecoveryFilters(params martini.Params, r render.Render, req *http.Request)

AutomatedRecoveryFilters retuens list of clusters which are configured with automated recovery

func (*API) BackendQueryMetricsAggregated added in v0.13.0

func (httpAPI *API) BackendQueryMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*API) BackendQueryMetricsRaw added in v0.13.0

func (httpAPI *API) BackendQueryMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)

BackendQueryMetricsRaw returns the raw backend query metrics

func (*API) BeginDowntime added in v0.13.0

func (httpAPI *API) BeginDowntime(params martini.Params, r render.Render, req *http.Request, user auth.User)

BeginDowntime sets a downtime flag with default duration

func (*API) BeginMaintenance added in v0.13.0

func (httpAPI *API) BeginMaintenance(params martini.Params, r render.Render, req *http.Request, user auth.User)

BeginMaintenance begins maintenance mode for given instance

func (*API) BlockedRecoveries added in v0.13.0

func (httpAPI *API) BlockedRecoveries(params martini.Params, r render.Render, req *http.Request)

BlockedRecoveries reads list of currently blocked recoveries, optionally filtered by cluster name

func (*API) BulkInstances added in v0.13.0

func (httpAPI *API) BulkInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)

BulkInstances returns a list of all known instances

func (*API) BulkPromotionRules added in v0.13.0

func (httpAPI *API) BulkPromotionRules(params martini.Params, r render.Render, req *http.Request, user auth.User)

BulkPromotionRules returns a list of the known promotion rules for each instance

func (*API) CanReplicateFrom added in v0.13.0

func (httpAPI *API) CanReplicateFrom(params martini.Params, r render.Render, req *http.Request, user auth.User)

CanReplicateFrom attempts to move an instance below another via pseudo GTID matching of binlog entries

func (*API) CanReplicateFromGTID added in v0.13.0

func (httpAPI *API) CanReplicateFromGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

CanReplicateFromGTID attempts to move an instance below another via GTID.

func (*API) CheckGlobalRecoveries added in v0.13.0

func (httpAPI *API) CheckGlobalRecoveries(params martini.Params, r render.Render, req *http.Request)

CheckGlobalRecoveries checks whether

func (*API) Cluster added in v0.13.0

func (httpAPI *API) Cluster(params martini.Params, r render.Render, req *http.Request)

Cluster provides list of instances in given cluster

func (*API) ClusterByAlias added in v0.13.0

func (httpAPI *API) ClusterByAlias(params martini.Params, r render.Render, req *http.Request)

ClusterByAlias provides list of instances in given cluster

func (*API) ClusterByInstance added in v0.13.0

func (httpAPI *API) ClusterByInstance(params martini.Params, r render.Render, req *http.Request)

ClusterByInstance provides list of instances in cluster an instance belongs to

func (*API) ClusterInfo added in v0.13.0

func (httpAPI *API) ClusterInfo(params martini.Params, r render.Render, req *http.Request)

ClusterInfo provides details of a given cluster

func (*API) ClusterInfoByAlias added in v0.13.0

func (httpAPI *API) ClusterInfoByAlias(params martini.Params, r render.Render, req *http.Request)

Cluster provides list of instances in given cluster

func (*API) ClusterOSCReplicas added in v0.13.0

func (httpAPI *API) ClusterOSCReplicas(params martini.Params, r render.Render, req *http.Request)

ClusterOSCReplicas returns heuristic list of OSC replicas

func (*API) ClusterPrimary added in v0.13.0

func (httpAPI *API) ClusterPrimary(params martini.Params, r render.Render, req *http.Request)

ClusterPrimary returns the writable primary of a given cluster

func (*API) Clusters added in v0.13.0

func (httpAPI *API) Clusters(params martini.Params, r render.Render, req *http.Request)

Clusters provides list of known clusters

func (*API) ClustersInfo added in v0.13.0

func (httpAPI *API) ClustersInfo(params martini.Params, r render.Render, req *http.Request)

ClustersInfo provides list of known clusters, along with some added metadata per cluster

func (*API) DeregisterHostnameUnresolve added in v0.13.0

func (httpAPI *API) DeregisterHostnameUnresolve(params martini.Params, r render.Render, req *http.Request, user auth.User)

DeregisterHostnameUnresolve deregisters the unresolve name used previously

func (*API) DetachReplicaPrimaryHost added in v0.13.0

func (httpAPI *API) DetachReplicaPrimaryHost(params martini.Params, r render.Render, req *http.Request, user auth.User)

DetachReplicaPrimaryHost detaches a replica from its primary by setting an invalid (yet revertible) host name

func (*API) DisableGTID added in v0.13.0

func (httpAPI *API) DisableGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

DisableGTID attempts to disable GTID on a replica, and revert to binlog file:pos

func (*API) DisableGlobalRecoveries added in v0.13.0

func (httpAPI *API) DisableGlobalRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)

DisableGlobalRecoveries globally disables recoveries

func (*API) Discover added in v0.13.0

func (httpAPI *API) Discover(params martini.Params, r render.Render, req *http.Request, user auth.User)

Discover issues a synchronous read on an instance

func (*API) DiscoveryMetricsAggregated added in v0.13.0

func (httpAPI *API) DiscoveryMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)

DiscoveryMetricsAggregated will return a single set of aggregated metrics for raw values collected since the specified time.

func (*API) DiscoveryMetricsRaw added in v0.13.0

func (httpAPI *API) DiscoveryMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)

DiscoveryMetricsRaw will return the last X seconds worth of discovery information in time based order as a JSON array

func (*API) DiscoveryQueueMetricsAggregated added in v0.13.0

func (httpAPI *API) DiscoveryQueueMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)

DiscoveryQueueMetricsAggregated returns a single value showing the metrics 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 (*API) DiscoveryQueueMetricsRaw added in v0.13.0

func (httpAPI *API) DiscoveryQueueMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)

DiscoveryQueueMetricsRaw returns the raw queue metrics (active and queued values), data taken secondly for the last N seconds.

func (*API) Downtimed added in v0.13.0

func (httpAPI *API) Downtimed(params martini.Params, r render.Render, req *http.Request)

Downtimed lists downtimed instances, potentially filtered by cluster

func (*API) EnableGTID added in v0.13.0

func (httpAPI *API) EnableGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

EnableGTID attempts to enable GTID on a replica

func (*API) EnableGlobalRecoveries added in v0.13.0

func (httpAPI *API) EnableGlobalRecoveries(params martini.Params, r render.Render, req *http.Request, user auth.User)

EnableGlobalRecoveries globally enables recoveries

func (*API) EndDowntime added in v0.13.0

func (httpAPI *API) EndDowntime(params martini.Params, r render.Render, req *http.Request, user auth.User)

EndDowntime terminates downtime (removes downtime flag) for an instance

func (*API) EndMaintenance added in v0.13.0

func (httpAPI *API) EndMaintenance(params martini.Params, r render.Render, req *http.Request, user auth.User)

EndMaintenance terminates maintenance mode

func (*API) EndMaintenanceByInstanceKey added in v0.13.0

func (httpAPI *API) EndMaintenanceByInstanceKey(params martini.Params, r render.Render, req *http.Request, user auth.User)

EndMaintenanceByInstanceKey terminates maintenance mode for given instance

func (*API) ErrantGTIDInjectEmpty added in v0.13.0

func (httpAPI *API) ErrantGTIDInjectEmpty(params martini.Params, r render.Render, req *http.Request, user auth.User)

ErrantGTIDInjectEmpty removes errant transactions by injecting and empty transaction on the cluster's primary

func (*API) ErrantGTIDResetPrimary added in v0.13.0

func (httpAPI *API) ErrantGTIDResetPrimary(params martini.Params, r render.Render, req *http.Request, user auth.User)

ErrantGTIDResetPrimary removes errant transactions on a server by way of RESET MASTER

func (*API) FlushBinaryLogs added in v0.13.0

func (httpAPI *API) FlushBinaryLogs(params martini.Params, r render.Render, req *http.Request, user auth.User)

FlushBinaryLogs runs a single FLUSH BINARY LOGS

func (*API) ForcePrimaryFailover added in v0.13.0

func (httpAPI *API) ForcePrimaryFailover(params martini.Params, r render.Render, req *http.Request, user auth.User)

ForcePrimaryFailover fails over a primary (even if there's no particular problem with the primary)

func (*API) ForcePrimaryTakeover added in v0.13.0

func (httpAPI *API) ForcePrimaryTakeover(params martini.Params, r render.Render, req *http.Request, user auth.User)

ForcePrimaryTakeover fails over a primary (even if there's no particular problem with the primary)

func (*API) Forget added in v0.13.0

func (httpAPI *API) Forget(params martini.Params, r render.Render, req *http.Request, user auth.User)

Forget removes an instance entry fro backend database

func (*API) ForgetCluster added in v0.13.0

func (httpAPI *API) ForgetCluster(params martini.Params, r render.Render, req *http.Request, user auth.User)

ForgetCluster forgets all instacnes of a cluster

func (*API) GetHeuristicClusterPoolInstances added in v0.13.0

func (httpAPI *API) GetHeuristicClusterPoolInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)

GetHeuristicClusterPoolInstances returns instances belonging to a cluster's pool

func (*API) GetHeuristicClusterPoolInstancesLag added in v0.13.0

func (httpAPI *API) GetHeuristicClusterPoolInstancesLag(params martini.Params, r render.Render, req *http.Request, user auth.User)

GetHeuristicClusterPoolInstances returns instances belonging to a cluster's pool

func (*API) GrabElection added in v0.13.0

func (httpAPI *API) GrabElection(params martini.Params, r render.Render, req *http.Request, user auth.User)

GrabElection forcibly grabs leadership. Use with care!!

func (*API) GracefulPrimaryTakeover added in v0.13.0

func (httpAPI *API) GracefulPrimaryTakeover(params martini.Params, r render.Render, req *http.Request, user auth.User)

GracefulPrimaryTakeover gracefully fails over a primary, either: - onto its single replica, or - onto a replica indicated by the user

func (*API) GracefulPrimaryTakeoverAuto added in v0.13.0

func (httpAPI *API) GracefulPrimaryTakeoverAuto(params martini.Params, r render.Render, req *http.Request, user auth.User)

GracefulPrimaryTakeoverAuto gracefully fails over a primary onto a replica of orchestrator's choosing

func (*API) Headers added in v0.13.0

func (httpAPI *API) Headers(params martini.Params, r render.Render, req *http.Request)

Headers is a self-test call which returns HTTP headers

func (*API) Health added in v0.13.0

func (httpAPI *API) Health(params martini.Params, r render.Render, req *http.Request)

Health performs a self test

func (*API) HostnameResolveCache added in v0.13.0

func (httpAPI *API) HostnameResolveCache(params martini.Params, r render.Render, req *http.Request)

HostnameResolveCache shows content of in-memory hostname cache

func (*API) InMaintenance added in v0.13.0

func (httpAPI *API) InMaintenance(params martini.Params, r render.Render, req *http.Request, user auth.User)

EndMaintenanceByInstanceKey terminates maintenance mode for given instance

func (*API) Instance added in v0.13.0

func (httpAPI *API) Instance(params martini.Params, r render.Render, req *http.Request)

Instance reads and returns an instance's details.

func (*API) InstanceReplicas added in v0.13.0

func (httpAPI *API) InstanceReplicas(params martini.Params, r render.Render, req *http.Request)

InstanceReplicas lists all replicas of given instance

func (*API) KillQuery added in v0.13.0

func (httpAPI *API) KillQuery(params martini.Params, r render.Render, req *http.Request, user auth.User)

KillQuery kills a query running on a server

func (*API) LBCheck added in v0.13.0

func (httpAPI *API) LBCheck(params martini.Params, r render.Render, req *http.Request)

LBCheck returns a constant respnse, and this can be used by load balancers that expect a given string.

func (*API) LeaderCheck added in v0.13.0

func (httpAPI *API) LeaderCheck(params martini.Params, r render.Render, req *http.Request)

LBCheck returns a constant respnse, and this can be used by load balancers that expect a given string.

func (*API) LocateErrantGTID added in v0.13.0

func (httpAPI *API) LocateErrantGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

LocateErrantGTID identifies the binlog positions for errant GTIDs on an instance

func (*API) Maintenance added in v0.13.0

func (httpAPI *API) Maintenance(params martini.Params, r render.Render, req *http.Request)

Maintenance provides list of instance under active maintenance

func (*API) MakeCoPrimary added in v0.13.0

func (httpAPI *API) MakeCoPrimary(params martini.Params, r render.Render, req *http.Request, user auth.User)

MakeCoPrimary attempts to make an instance co-primary with its own primary

func (*API) MoveBelow added in v0.13.0

func (httpAPI *API) MoveBelow(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveBelow attempts to move an instance below its supposed sibling

func (*API) MoveBelowGTID added in v0.13.0

func (httpAPI *API) MoveBelowGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveBelowGTID attempts to move an instance below another, via GTID

func (*API) MoveReplicasGTID added in v0.13.0

func (httpAPI *API) MoveReplicasGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveReplicasGTID attempts to move an instance below another, via GTID

func (*API) MoveUp added in v0.13.0

func (httpAPI *API) MoveUp(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveUp attempts to move an instance up the topology

func (*API) MoveUpReplicas added in v0.13.0

func (httpAPI *API) MoveUpReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveUpReplicas attempts to move up all replicas of an instance

func (*API) Primaries added in v0.13.0

func (httpAPI *API) Primaries(params martini.Params, r render.Render, req *http.Request)

Clusters provides list of known primaries

func (*API) Problems added in v0.13.0

func (httpAPI *API) Problems(params martini.Params, r render.Render, req *http.Request)

Problems provides list of instances with known problems

func (*API) PurgeBinaryLogs added in v0.13.0

func (httpAPI *API) PurgeBinaryLogs(params martini.Params, r render.Render, req *http.Request, user auth.User)

PurgeBinaryLogs purges binary logs up to given binlog file

func (*API) ReadClusterPoolInstancesMap added in v0.13.0

func (httpAPI *API) 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 (*API) ReadReplicationAnalysisChangelog added in v0.13.0

func (httpAPI *API) ReadReplicationAnalysisChangelog(params martini.Params, r render.Render, req *http.Request)

ReadReplicationAnalysisChangelog lists instances and their analysis changelog

func (*API) ReattachReplicaPrimaryHost added in v0.13.0

func (httpAPI *API) ReattachReplicaPrimaryHost(params martini.Params, r render.Render, req *http.Request, user auth.User)

ReattachReplicaPrimaryHost reverts a detachReplicaPrimaryHost command by resetting the original primary hostname in CHANGE MASTER TO

func (*API) RecentlyActiveClusterRecovery added in v0.13.0

func (httpAPI *API) RecentlyActiveClusterRecovery(params martini.Params, r render.Render, req *http.Request)

RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster

func (*API) RecentlyActiveInstanceRecovery added in v0.13.0

func (httpAPI *API) RecentlyActiveInstanceRecovery(params martini.Params, r render.Render, req *http.Request)

RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster

func (*API) Recover added in v0.13.0

func (httpAPI *API) Recover(params martini.Params, r render.Render, req *http.Request, user auth.User)

Recover attempts recovery on a given instance

func (*API) RecoverLite added in v0.13.0

func (httpAPI *API) RecoverLite(params martini.Params, r render.Render, req *http.Request, user auth.User)

RecoverLite attempts recovery on a given instance, without executing external processes

func (*API) Reelect added in v0.13.0

func (httpAPI *API) Reelect(params martini.Params, r render.Render, req *http.Request, user auth.User)

Reelect causes re-elections for an active node

func (*API) Refresh added in v0.13.0

func (httpAPI *API) Refresh(params martini.Params, r render.Render, req *http.Request, user auth.User)

Refresh synchronuously re-reads a topology instance

func (*API) RegisterCandidate added in v0.13.0

func (httpAPI *API) RegisterCandidate(params martini.Params, r render.Render, req *http.Request, user auth.User)

Registers promotion preference for given instance

func (*API) RegisterHostnameUnresolve added in v0.13.0

func (httpAPI *API) RegisterHostnameUnresolve(params martini.Params, r render.Render, req *http.Request, user auth.User)

RegisterHostnameUnresolve registers the unresolve name to use

func (*API) RegisterRequests added in v0.13.0

func (httpAPI *API) RegisterRequests(m *martini.ClassicMartini)

RegisterRequests makes for the de-facto list of known API calls

func (*API) RegroupReplicas added in v0.13.0

func (httpAPI *API) RegroupReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)

RegroupReplicas attempts to pick a replica of a given instance and make it take its siblings, using any method possible (GTID, binlog servers)

func (*API) RegroupReplicasBinlogServers added in v0.13.0

func (httpAPI *API) RegroupReplicasBinlogServers(params martini.Params, r render.Render, req *http.Request, user auth.User)

RegroupReplicasBinlogServers attempts to pick a replica of a given instance and make it take its siblings, efficiently, using GTID

func (*API) RegroupReplicasGTID added in v0.13.0

func (httpAPI *API) RegroupReplicasGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

RegroupReplicasGTID attempts to pick a replica of a given instance and make it take its siblings, efficiently, using GTID

func (*API) ReloadClusterAlias added in v0.13.0

func (httpAPI *API) ReloadClusterAlias(params martini.Params, r render.Render, req *http.Request, user auth.User)

ReloadClusterAlias clears in-memory hostname resovle cache

func (*API) ReloadConfiguration added in v0.13.0

func (httpAPI *API) ReloadConfiguration(params martini.Params, r render.Render, req *http.Request, user auth.User)

ReloadConfiguration reloads confiug settings (not all of which will apply after change)

func (*API) RelocateBelow added in v0.13.0

func (httpAPI *API) RelocateBelow(params martini.Params, r render.Render, req *http.Request, user auth.User)

RelocateBelow attempts to move an instance below another, orchestrator choosing the best (potentially multi-step) relocation method

func (*API) RelocateReplicas added in v0.13.0

func (httpAPI *API) RelocateReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)

Relocates attempts to smartly relocate replicas of a given instance below another

func (*API) ReplicationAnalysis added in v0.13.0

func (httpAPI *API) ReplicationAnalysis(params martini.Params, r render.Render, req *http.Request)

ReplicationAnalysis retuens list of issues

func (*API) ReplicationAnalysisForCluster added in v0.13.0

func (httpAPI *API) ReplicationAnalysisForCluster(params martini.Params, r render.Render, req *http.Request)

ReplicationAnalysis retuens list of issues

func (*API) ReplicationAnalysisForKey added in v0.13.0

func (httpAPI *API) ReplicationAnalysisForKey(params martini.Params, r render.Render, req *http.Request)

ReplicationAnalysis retuens list of issues

func (*API) Repoint added in v0.13.0

func (httpAPI *API) Repoint(params martini.Params, r render.Render, req *http.Request, user auth.User)

Repoint positiones a replica under another (or same) primary with exact same coordinates. Useful for binlog servers

func (*API) RepointReplicas added in v0.13.0

func (httpAPI *API) RepointReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveUpReplicas attempts to move up all replicas of an instance

func (*API) ResetHostnameResolveCache added in v0.13.0

func (httpAPI *API) ResetHostnameResolveCache(params martini.Params, r render.Render, req *http.Request, user auth.User)

ResetHostnameResolveCache clears in-memory hostname resovle cache

func (*API) ResetReplication added in v0.13.0

func (httpAPI *API) ResetReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)

ResetReplication makes a replica forget about its primary, effectively breaking the replication

func (*API) Resolve added in v0.13.0

func (httpAPI *API) Resolve(params martini.Params, r render.Render, req *http.Request)

Resolve tries to resolve hostname and then checks to see if port is open on that host.

func (*API) RestartReplication added in v0.13.0

func (httpAPI *API) RestartReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)

RestartReplication stops & starts replication on given instance

func (*API) RestartReplicationStatements added in v0.13.0

func (httpAPI *API) RestartReplicationStatements(params martini.Params, r render.Render, req *http.Request, user auth.User)

RestartReplicationStatements receives a query to execute that requires a replication restart to apply. As an example, this may be `set global rpl_semi_sync_slave_enabled=1`. orchestrator will check replication status on given host and will wrap with appropriate stop/start statements, if need be.

func (*API) Search added in v0.13.0

func (httpAPI *API) Search(params martini.Params, r render.Render, req *http.Request)

Search provides list of instances matching given search param via various criteria.

func (*API) SetClusterAliasManualOverride added in v0.13.0

func (httpAPI *API) SetClusterAliasManualOverride(params martini.Params, r render.Render, req *http.Request, user auth.User)

SetClusterAlias will change an alias for a given clustername

func (*API) SetReadOnly added in v0.13.0

func (httpAPI *API) SetReadOnly(params martini.Params, r render.Render, req *http.Request, user auth.User)

SetReadOnly sets the global read_only variable

func (*API) SetWriteable added in v0.13.0

func (httpAPI *API) SetWriteable(params martini.Params, r render.Render, req *http.Request, user auth.User)

SetWriteable clear the global read_only variable

func (*API) SkipQuery added in v0.13.0

func (httpAPI *API) SkipQuery(params martini.Params, r render.Render, req *http.Request, user auth.User)

SkipQuery skips a single query on a failed replication instance

func (*API) SnapshotTopologies added in v0.13.0

func (httpAPI *API) SnapshotTopologies(params martini.Params, r render.Render, req *http.Request)

SnapshotTopologies triggers orchestrator to record a snapshot of host/primary for all known hosts.

func (*API) StartReplication added in v0.13.0

func (httpAPI *API) StartReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)

StartReplication starts replication on given instance

func (*API) StatusCheck added in v0.13.0

func (httpAPI *API) StatusCheck(params martini.Params, r render.Render, req *http.Request)

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 (*API) StopReplication added in v0.13.0

func (httpAPI *API) StopReplication(params martini.Params, r render.Render, req *http.Request, user auth.User)

StopReplication stops replication on given instance

func (*API) StopReplicationNicely added in v0.13.0

func (httpAPI *API) 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 (*API) SubmitPoolInstances added in v0.13.0

func (httpAPI *API) SubmitPoolInstances(params martini.Params, r render.Render, req *http.Request, user auth.User)

SubmitPoolInstances (re-)applies the list of hostnames for a given pool

func (*API) SubmitPrimariesToKvStores added in v0.13.0

func (httpAPI *API) SubmitPrimariesToKvStores(params martini.Params, r render.Render, req *http.Request)

SubmitPrimariesToKvStores writes a cluster's primary (or all clusters primaries) to kv stores. This should generally only happen once in a lifetime of a cluster. Otherwise KV stores are updated via failovers.

func (*API) Tag added in v0.13.0

func (httpAPI *API) Tag(params martini.Params, r render.Render, req *http.Request)

Tags adds a tag to a given instance

func (*API) TagValue added in v0.13.0

func (httpAPI *API) TagValue(params martini.Params, r render.Render, req *http.Request)

TagValue returns a given tag's value for a specific instance

func (*API) Tagged added in v0.13.0

func (httpAPI *API) Tagged(params martini.Params, r render.Render, req *http.Request)

Tagged return instance keys tagged by "tag" query param

func (*API) Tags added in v0.13.0

func (httpAPI *API) Tags(params martini.Params, r render.Render, req *http.Request)

Tags lists existing tags for a given instance

func (*API) TakePrimary added in v0.13.0

func (httpAPI *API) TakePrimary(params martini.Params, r render.Render, req *http.Request, user auth.User)

TakePrimary

func (*API) TakeSiblings added in v0.13.0

func (httpAPI *API) TakeSiblings(params martini.Params, r render.Render, req *http.Request, user auth.User)

TakeSiblings

func (*API) Untag added in v0.13.0

func (httpAPI *API) Untag(params martini.Params, r render.Render, req *http.Request)

Untag removes a tag from an instance

func (*API) UntagAll added in v0.13.0

func (httpAPI *API) UntagAll(params martini.Params, r render.Render, req *http.Request)

UntagAll removes a tag from all matching instances

func (*API) WriteBufferMetricsAggregated added in v0.13.0

func (httpAPI *API) WriteBufferMetricsAggregated(params martini.Params, r render.Render, req *http.Request, user auth.User)

WriteBufferMetricsAggregated provides aggregate metrics of instance write buffer metrics

func (*API) WriteBufferMetricsRaw added in v0.13.0

func (httpAPI *API) WriteBufferMetricsRaw(params martini.Params, r render.Render, req *http.Request, user auth.User)

WriteBufferMetricsRaw returns the raw instance write buffer metrics

type APIResponse

type APIResponse struct {
	Code    APIResponseCode
	Message string
	Details any
}

APIResponse is a response returned as JSON to various requests.

type APIResponseCode

type APIResponseCode int

APIResponseCode is an OK/ERROR response code

const (
	ERROR APIResponseCode = iota
	OK
)

func (*APIResponseCode) HTTPStatus added in v0.13.0

func (apiResponseCode *APIResponseCode) HTTPStatus() int

HTTPStatus returns the respective HTTP status for this response

func (*APIResponseCode) MarshalJSON

func (apiResponseCode *APIResponseCode) MarshalJSON() ([]byte, error)

func (*APIResponseCode) String

func (apiResponseCode *APIResponseCode) String() string

type Web

type Web struct {
	URLPrefix string
}

Web is the web requests server, mapping each request to a web page

func (*Web) About added in v0.13.0

func (httpWeb *Web) About(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) AccessToken added in v0.13.0

func (httpWeb *Web) AccessToken(params martini.Params, r render.Render, req *http.Request, resp http.ResponseWriter, user auth.User)

func (*Web) Agent added in v0.13.0

func (httpWeb *Web) Agent(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) AgentSeedDetails added in v0.13.0

func (httpWeb *Web) AgentSeedDetails(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Agents added in v0.13.0

func (httpWeb *Web) Agents(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Audit added in v0.13.0

func (httpWeb *Web) Audit(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) AuditFailureDetection added in v0.13.0

func (httpWeb *Web) AuditFailureDetection(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) AuditRecovery added in v0.13.0

func (httpWeb *Web) AuditRecovery(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Cluster added in v0.13.0

func (httpWeb *Web) Cluster(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) ClusterByAlias added in v0.13.0

func (httpWeb *Web) ClusterByAlias(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) ClusterByInstance added in v0.13.0

func (httpWeb *Web) ClusterByInstance(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) ClusterPools added in v0.13.0

func (httpWeb *Web) ClusterPools(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Clusters added in v0.13.0

func (httpWeb *Web) Clusters(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) ClustersAnalysis added in v0.13.0

func (httpWeb *Web) ClustersAnalysis(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Discover added in v0.13.0

func (httpWeb *Web) Discover(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) FAQ added in v0.13.0

func (httpWeb *Web) FAQ(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Home added in v0.13.0

func (httpWeb *Web) Home(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Index added in v0.13.0

func (httpWeb *Web) Index(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) KeepCalm added in v0.13.0

func (httpWeb *Web) KeepCalm(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) RegisterDebug added in v0.13.0

func (httpWeb *Web) RegisterDebug(m *martini.ClassicMartini)

RegisterDebug adds handlers for /debug/vars (expvar) and /debug/pprof (net/http/pprof) support

func (*Web) RegisterRequests added in v0.13.0

func (httpWeb *Web) RegisterRequests(m *martini.ClassicMartini)

RegisterRequests makes for the de-facto list of known Web calls

func (*Web) Search added in v0.13.0

func (httpWeb *Web) Search(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Seeds added in v0.13.0

func (httpWeb *Web) Seeds(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*Web) Status added in v0.13.0

func (httpWeb *Web) Status(params martini.Params, r render.Render, req *http.Request, user auth.User)

Jump to

Keyboard shortcuts

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