http

package
v2.1.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2017 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIResponse

type APIResponse struct {
	Code    APIResponseCode
	Message string
	Details interface{}
}

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) MarshalJSON

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

func (*APIResponseCode) String

func (this *APIResponseCode) String() string

type HttpAPI

type HttpAPI struct {
	URLPrefix string
}
var API HttpAPI = HttpAPI{}

func (*HttpAPI) AbortSeed

func (this *HttpAPI) AbortSeed(params martini.Params, r render.Render, req *http.Request, user auth.User)

AbortSeed instructs agents to abort an active seed

func (*HttpAPI) AcknowledgeClusterRecoveries

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

ClusterInfo provides details of a given cluster

func (*HttpAPI) AcknowledgeInstanceRecoveries

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

ClusterInfo provides details of a given cluster

func (*HttpAPI) AcknowledgeRecovery

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

ClusterInfo provides details of a given cluster

func (*HttpAPI) ActiveClusterRecovery

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

ActiveClusterRecovery returns recoveries in-progress for a given cluster

func (*HttpAPI) Agent

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

Agent returns complete information of a given agent

func (*HttpAPI) AgentActiveSeeds

func (this *HttpAPI) AgentActiveSeeds(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentActiveSeeds lists active seeds and their state

func (*HttpAPI) AgentCreateSnapshot

func (this *HttpAPI) AgentCreateSnapshot(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentCreateSnapshot instructs an agent to create a new snapshot. Agent's DIY implementation.

func (*HttpAPI) AgentCustomCommand

func (this *HttpAPI) AgentCustomCommand(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*HttpAPI) AgentMountLV

func (this *HttpAPI) AgentMountLV(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentMountLV instructs an agent to mount a given volume on the designated mount point

func (*HttpAPI) AgentMySQLStart

func (this *HttpAPI) AgentMySQLStart(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentMySQLStart starts MySQL service on agent

func (*HttpAPI) AgentMySQLStop

func (this *HttpAPI) AgentMySQLStop(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentMySQLStop stops MySQL service on agent

func (*HttpAPI) AgentRecentSeeds

func (this *HttpAPI) AgentRecentSeeds(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentRecentSeeds lists recent seeds of a given agent

func (*HttpAPI) AgentRemoveLV

func (this *HttpAPI) AgentRemoveLV(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentRemoveLV instructs an agent to remove a logical volume

func (*HttpAPI) AgentSeed

func (this *HttpAPI) AgentSeed(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentSeed completely seeds a host with another host's snapshots. This is a complex operation governed by orchestrator and executed by the two agents involved.

func (*HttpAPI) AgentSeedDetails

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

AgentSeedDetails provides details of a given seed

func (*HttpAPI) AgentSeedStates

func (this *HttpAPI) AgentSeedStates(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentSeedStates returns the breakdown of states (steps) of a given seed

func (*HttpAPI) AgentUnmount

func (this *HttpAPI) AgentUnmount(params martini.Params, r render.Render, req *http.Request, user auth.User)

AgentUnmount instructs an agent to unmount the designated mount point

func (*HttpAPI) Agents

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

Agents provides complete list of registered agents (See https://github.com/github/orchestrator-agent)

func (*HttpAPI) AsyncDiscover

func (this *HttpAPI) 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 (*HttpAPI) Audit

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

Audit provides list of audit entries by given page number

func (*HttpAPI) AuditFailureDetection

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

AuditFailureDetection provides list of topology_failure_detection entries

func (*HttpAPI) AuditRecovery

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

AuditRecovery provides list of topology-recovery entries

func (*HttpAPI) AuditRecoverySteps

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

AuditRecoverySteps returns audited steps of a given recovery

func (*HttpAPI) AutomatedRecoveryFilters

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

AutomatedRecoveryFilters retuens list of clusters which are configured with automated recovery

func (*HttpAPI) BackendQueryMetricsAggregated

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

func (*HttpAPI) BackendQueryMetricsRaw

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

BackendQueryMetricsRaw returns the raw backend query metrics

func (*HttpAPI) BeginDowntime

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

BeginDowntime sets a downtime flag with default duration

func (*HttpAPI) BeginMaintenance

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

BeginMaintenance begins maintenance mode for given instance

func (*HttpAPI) BlockedRecoveries

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

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

func (*HttpAPI) BulkInstances

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

BulkInstances returns a list of all known instances

func (*HttpAPI) BulkPromotionRules

func (this *HttpAPI) 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 (*HttpAPI) Cluster

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

Cluster provides list of instances in given cluster

func (*HttpAPI) ClusterByAlias

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

ClusterByAlias provides list of instances in given cluster

func (*HttpAPI) ClusterByInstance

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

ClusterByInstance provides list of instances in cluster an instance belongs to

func (*HttpAPI) ClusterInfo

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

ClusterInfo provides details of a given cluster

func (*HttpAPI) ClusterInfoByAlias

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

Cluster provides list of instances in given cluster

func (*HttpAPI) ClusterOSCReplicas

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

ClusterOSCReplicas returns heuristic list of OSC replicas

func (*HttpAPI) Clusters

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

Clusters provides list of known clusters

func (*HttpAPI) ClustersInfo

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

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

func (*HttpAPI) DeregisterHostnameUnresolve

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

DeregisterHostnameUnresolve deregisters the unresolve name used previously

func (*HttpAPI) DetachReplica

func (this *HttpAPI) DetachReplica(params martini.Params, r render.Render, req *http.Request, user auth.User)

DetachReplica corrupts a replica's binlog corrdinates (though encodes it in such way that is reversible), effectively breaking replication

func (*HttpAPI) DisableGTID

func (this *HttpAPI) 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 (*HttpAPI) Discover

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

Discover issues a synchronous read on an instance

func (*HttpAPI) DiscoveryMetricsAggregated

func (this *HttpAPI) 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 (*HttpAPI) DiscoveryMetricsRaw

func (this *HttpAPI) 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 (*HttpAPI) DiscoveryQueueMetricsAggregated

func (this *HttpAPI) 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 (*HttpAPI) DiscoveryQueueMetricsRaw

func (this *HttpAPI) 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 (*HttpAPI) EnableGTID

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

EnableGTID attempts to enable GTID on a replica

func (*HttpAPI) EndDowntime

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

EndDowntime terminates downtime (removes downtime flag) for an instance

func (*HttpAPI) EndMaintenance

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

EndMaintenance terminates maintenance mode

func (*HttpAPI) EndMaintenanceByInstanceKey

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

EndMaintenanceByInstanceKey terminates maintenance mode for given instance

func (*HttpAPI) Forget

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

Forget removes an instance entry fro backend database

func (*HttpAPI) GetHeuristicClusterPoolInstances

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

GetHeuristicClusterPoolInstances returns instances belonging to a cluster's pool

func (*HttpAPI) GetHeuristicClusterPoolInstancesLag

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

GetHeuristicClusterPoolInstances returns instances belonging to a cluster's pool

func (*HttpAPI) GrabElection

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

GrabElection forcibly grabs leadership. Use with care!!

func (*HttpAPI) Headers

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

Headers is a self-test call which returns HTTP headers

func (*HttpAPI) Health

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

Health performs a self test

func (*HttpAPI) HostnameResolveCache

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

HostnameResolveCache shows content of in-memory hostname cache

func (*HttpAPI) Instance

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

Instance reads and returns an instance's details.

func (*HttpAPI) KillQuery

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

KillQuery kills a query running on a server

func (*HttpAPI) LBCheck

func (this *HttpAPI) 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 (*HttpAPI) LastPseudoGTID

func (this *HttpAPI) LastPseudoGTID(params martini.Params, r render.Render, req *http.Request, user auth.User)

LastPseudoGTID attempts to find the last pseugo-gtid entry in an instance

func (*HttpAPI) LongQueries

func (this *HttpAPI) LongQueries(params martini.Params, r render.Render, req *http.Request)

LongQueries lists queries running for a long time, on all instances, optionally filtered by arbitrary text

func (*HttpAPI) Maintenance

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

Maintenance provides list of instance under active maintenance

func (*HttpAPI) MakeCoMaster

func (this *HttpAPI) MakeCoMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)

MakeCoMaster attempts to make an instance co-master with its own master

func (*HttpAPI) MakeLocalMaster

func (this *HttpAPI) MakeLocalMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)

MakeLocalMaster attempts to make the given instance a local master: take over its master by enslaving its siblings and replicating from its grandparent.

func (*HttpAPI) MakeMaster

func (this *HttpAPI) MakeMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)

MakeMaster attempts to make the given instance a master, and match its siblings to be its replicas

func (*HttpAPI) MasterEquivalent

func (this *HttpAPI) MasterEquivalent(params martini.Params, r render.Render, req *http.Request, user auth.User)

MasterEquivalent provides (possibly empty) list of master coordinates equivalent to the given ones

func (*HttpAPI) MatchBelow

func (this *HttpAPI) MatchBelow(params martini.Params, r render.Render, req *http.Request, user auth.User)

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

func (*HttpAPI) MatchUp

func (this *HttpAPI) MatchUp(params martini.Params, r render.Render, req *http.Request, user auth.User)

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

func (*HttpAPI) MatchUpReplicas

func (this *HttpAPI) MatchUpReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)

MatchUpReplicas attempts to match up all replicas of an instance

func (*HttpAPI) MoveBelow

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

MoveBelow attempts to move an instance below its supposed sibling

func (*HttpAPI) MoveBelowGTID

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

MoveBelowGTID attempts to move an instance below another, via GTID

func (*HttpAPI) MoveEquivalent

func (this *HttpAPI) MoveEquivalent(params martini.Params, r render.Render, req *http.Request, user auth.User)

MoveEquivalent attempts to move an instance below another, baseed on known equivalence master coordinates

func (*HttpAPI) MoveReplicasGTID

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

MoveReplicasGTID attempts to move an instance below another, via GTID

func (*HttpAPI) MoveUp

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

MoveUp attempts to move an instance up the topology

func (*HttpAPI) MoveUpReplicas

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

MoveUpReplicas attempts to move up all replicas of an instance

func (*HttpAPI) MultiMatchReplicas

func (this *HttpAPI) MultiMatchReplicas(params martini.Params, r render.Render, req *http.Request, user auth.User)

MultiMatchReplicas attempts to match all replicas of a given instance below another, efficiently

func (*HttpAPI) Problems

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

Problems provides list of instances with known problems

func (*HttpAPI) ReadClusterPoolInstancesMap

func (this *HttpAPI) 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 (*HttpAPI) ReadReplicationAnalysisChangelog

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

ReadReplicationAnalysisChangelog lists instances and their analysis changelog

func (*HttpAPI) ReattachReplica

func (this *HttpAPI) ReattachReplica(params martini.Params, r render.Render, req *http.Request, user auth.User)

ReattachReplica reverts a DetachReplica commands by reassigning the correct binlog coordinates to an instance

func (*HttpAPI) ReattachReplicaMasterHost

func (this *HttpAPI) ReattachReplicaMasterHost(params martini.Params, r render.Render, req *http.Request, user auth.User)

ReattachReplicaMasterHost reverts a achReplicaMasterHost command by resoting the original master hostname in CHANGE MASTER TO

func (*HttpAPI) RecentlyActiveClusterRecovery

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

RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster

func (*HttpAPI) RecentlyActiveInstanceRecovery

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

RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster

func (*HttpAPI) Recover

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

Recover attempts recovery on a given instance

func (*HttpAPI) RecoverLite

func (this *HttpAPI) 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 (*HttpAPI) Reelect

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

Reelect causes re-elections for an active node

func (*HttpAPI) Refresh

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

Refresh synchronuously re-reads a topology instance

func (*HttpAPI) RegisterCandidate

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

Registers promotion preference for given instance

func (*HttpAPI) RegisterHostnameUnresolve

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

RegisterHostnameUnresolve registers the unresolve name to use

func (*HttpAPI) RegisterRequests

func (this *HttpAPI) RegisterRequests(m *martini.ClassicMartini)

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

func (*HttpAPI) RegroupReplicas

func (this *HttpAPI) 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, Pseudo-GTID, binlog servers)

func (*HttpAPI) RegroupReplicasBinlogServers

func (this *HttpAPI) 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 (*HttpAPI) RegroupReplicasGTID

func (this *HttpAPI) 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 (*HttpAPI) RegroupReplicasPseudoGTID

func (this *HttpAPI) RegroupReplicasPseudoGTID(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, efficiently, using pseudo-gtid if necessary

func (*HttpAPI) ReloadClusterAlias

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

ReloadClusterAlias clears in-memory hostname resovle cache

func (*HttpAPI) ReloadConfiguration

func (this *HttpAPI) 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 (*HttpAPI) RelocateBelow

func (this *HttpAPI) 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 (*HttpAPI) RelocateReplicas

func (this *HttpAPI) 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 (*HttpAPI) ReplicationAnalysis

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

ReplicationAnalysis retuens list of issues

func (*HttpAPI) RepointReplicas

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

MoveUpReplicas attempts to move up all replicas of an instance

func (*HttpAPI) ResetHostnameResolveCache

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

ResetHostnameResolveCache clears in-memory hostname resovle cache

func (*HttpAPI) ResetSlave

func (this *HttpAPI) ResetSlave(params martini.Params, r render.Render, req *http.Request, user auth.User)

ResetSlave makes a replica forget about its master, effectively breaking the replication

func (*HttpAPI) Resolve

func (this *HttpAPI) 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 (*HttpAPI) RestartSlave

func (this *HttpAPI) RestartSlave(params martini.Params, r render.Render, req *http.Request, user auth.User)

RestartSlave stops & starts replication on given instance

func (*HttpAPI) Search

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

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

func (*HttpAPI) Seeds

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

Seeds retruns all recent seeds

func (*HttpAPI) SetClusterAliasManualOverride

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

SetClusterAlias will change an alias for a given clustername

func (*HttpAPI) SetReadOnly

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

SetReadOnly sets the global read_only variable

func (*HttpAPI) SetWriteable

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

SetWriteable clear the global read_only variable

func (*HttpAPI) SkipQuery

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

SkipQuery skips a single query on a failed replication instance

func (*HttpAPI) StartSlave

func (this *HttpAPI) StartSlave(params martini.Params, r render.Render, req *http.Request, user auth.User)

StartSlave starts replication on given instance

func (*HttpAPI) StatusCheck

func (this *HttpAPI) 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 (*HttpAPI) StopSlave

func (this *HttpAPI) StopSlave(params martini.Params, r render.Render, req *http.Request, user auth.User)

StopSlave stops replication on given instance

func (*HttpAPI) StopSlaveNicely

func (this *HttpAPI) StopSlaveNicely(params martini.Params, r render.Render, req *http.Request, user auth.User)

StopSlaveNicely stops replication on given instance, such that sql thead is aligned with IO thread

func (*HttpAPI) SubmitPoolInstances

func (this *HttpAPI) 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 (*HttpAPI) TakeMaster

func (this *HttpAPI) TakeMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)

TakeMaster

func (*HttpAPI) TakeSiblings

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

TakeSiblings

type HttpAgentsAPI

type HttpAgentsAPI struct {
	URLPrefix string
}
var AgentsAPI HttpAgentsAPI = HttpAgentsAPI{}

func (*HttpAgentsAPI) AgentPing

func (this *HttpAgentsAPI) AgentPing(params martini.Params, r render.Render, req *http.Request)

func (*HttpAgentsAPI) AgentsHosts

func (this *HttpAgentsAPI) AgentsHosts(params martini.Params, r render.Render, req *http.Request) string

AgentsHosts provides list of agent host names

func (*HttpAgentsAPI) AgentsInstances

func (this *HttpAgentsAPI) AgentsInstances(params martini.Params, r render.Render, req *http.Request) string

AgentsInstances provides list of assumed MySQL instances (host:port)

func (*HttpAgentsAPI) GetHostAttributeByAttributeName

func (this *HttpAgentsAPI) GetHostAttributeByAttributeName(params martini.Params, r render.Render, req *http.Request)

GetHostAttributeByAttributeName returns a host attribute

func (*HttpAgentsAPI) RegisterRequests

func (this *HttpAgentsAPI) RegisterRequests(m *martini.ClassicMartini)

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

func (*HttpAgentsAPI) SetHostAttribute

func (this *HttpAgentsAPI) SetHostAttribute(params martini.Params, r render.Render, req *http.Request)

SetHostAttribute is a utility method that allows per-host key-value store.

func (*HttpAgentsAPI) SubmitAgent

func (this *HttpAgentsAPI) SubmitAgent(params martini.Params, r render.Render)

SubmitAgent registeres an agent. It is initiated by an agent to register itself.

type HttpWeb

type HttpWeb struct {
	URLPrefix string
}

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

var Web HttpWeb = HttpWeb{}

func (*HttpWeb) About

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

func (*HttpWeb) AccessToken

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

func (*HttpWeb) Agent

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

func (*HttpWeb) AgentSeedDetails

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

func (*HttpWeb) Agents

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

func (*HttpWeb) Audit

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

func (*HttpWeb) AuditFailureDetection

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

func (*HttpWeb) AuditRecovery

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

func (*HttpWeb) AuditRecoverySteps

func (this *HttpWeb) AuditRecoverySteps(params martini.Params, r render.Render, req *http.Request, user auth.User)

func (*HttpWeb) Cluster

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

func (*HttpWeb) ClusterByAlias

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

func (*HttpWeb) ClusterByInstance

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

func (*HttpWeb) ClusterPools

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

func (*HttpWeb) Clusters

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

func (*HttpWeb) ClustersAnalysis

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

func (*HttpWeb) Discover

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

func (*HttpWeb) FAQ

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

func (*HttpWeb) Home

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

func (*HttpWeb) Index

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

func (*HttpWeb) KeepCalm

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

func (*HttpWeb) LongQueries

func (this *HttpWeb) LongQueries(params martini.Params, r render.Render, req *http.Request, user auth.User)

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

func (*HttpWeb) Search

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

func (*HttpWeb) Seeds

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

func (*HttpWeb) Status

func (this *HttpWeb) 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