http

package
v1.3.26 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2015 License: Apache-2.0 Imports: 15 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{}
var API HttpAPI = HttpAPI{}

func (*HttpAPI) AbortSeed added in v1.1.2

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) Agent added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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) AgentMountLV added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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 added in v1.1.2

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/outbrain/orchestrator-agent)

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

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

Cluster provides list of instances in given cluster

func (*HttpAPI) ClusterInfo added in v1.2.20

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

ClusterInfo provides details of a given cluster

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 added in v1.1.2

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) DetachSlave added in v1.0.5

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

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

func (*HttpAPI) Discover

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

Discover starts an asynchronuous discovery 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) EnslaveSiblingsSimple added in v1.3.6

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

EnslaveSiblingsSimple

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) GrabElection added in v1.3.25

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 added in v1.1.2

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 added in v1.3.10

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

Health performs a self test

func (*HttpAPI) HostnameResolveCache added in v1.3.25

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 added in v1.1.2

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) LastPseudoGTID added in v1.3.19

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 added in v1.1.2

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 added in v1.0.5

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 added in v1.2.9

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 added in v1.2.9

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 slaves

func (*HttpAPI) MatchBelow added in v1.2.9

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) MatchUpSlaves added in v1.3.6

func (this *HttpAPI) MatchUpSlaves(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) 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) 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) MultiMatchSlaves added in v1.3.10

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

MultiMatchSlaves attempts to match all slaves 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) ReattachSlave added in v1.3.19

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

ReattachSlave reverts a DetachSlave commands by reassigning the correct binlog coordinates to an instance

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

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

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

func (*HttpAPI) RegroupSlaves added in v1.3.19

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

RegroupSlaves attempts to pick a slave of a given instance and make it enslave its siblings, efficiently, using pseudo-gtid if necessary

func (*HttpAPI) ResetHostnameResolveCache added in v1.2.12

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

ResetHostnameResolveCache clears in-memory hostname resovle cache

func (*HttpAPI) ResetSlave added in v1.1.11

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

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

func (*HttpAPI) Resolve added in v1.0.4

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) 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 added in v1.1.2

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

Seeds retruns all recent seeds

func (*HttpAPI) SetClusterAlias added in v1.2.20

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

ClusterInfo provides details of a given cluster

func (*HttpAPI) SetReadOnly added in v1.1.11

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 added in v1.1.11

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) 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) 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 added in v1.2.9

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

type HttpAgentsAPI added in v1.1.2

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

func (*HttpAgentsAPI) AgentsHosts added in v1.1.2

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

AgentsHosts provides list of agent host names

func (*HttpAgentsAPI) AgentsInstances added in v1.1.2

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 added in v1.1.2

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

GetHostAttributeByAttributeName returns a host attribute

func (*HttpAgentsAPI) RegisterRequests added in v1.1.2

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

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

func (*HttpAgentsAPI) SetHostAttribute added in v1.1.2

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 added in v1.1.2

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{}

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)

func (*HttpWeb) Agent added in v1.1.2

func (this *HttpWeb) Agent(params martini.Params, r render.Render)

func (*HttpWeb) AgentSeedDetails added in v1.1.2

func (this *HttpWeb) AgentSeedDetails(params martini.Params, r render.Render)

func (*HttpWeb) Agents added in v1.1.2

func (this *HttpWeb) Agents(params martini.Params, r render.Render)

func (*HttpWeb) Audit

func (this *HttpWeb) Audit(params martini.Params, r render.Render)

func (*HttpWeb) Cluster

func (this *HttpWeb) Cluster(params martini.Params, r render.Render)

func (*HttpWeb) Clusters added in v1.1.2

func (this *HttpWeb) Clusters(params martini.Params, r render.Render)

func (*HttpWeb) Discover

func (this *HttpWeb) Discover(params martini.Params, r render.Render)

func (*HttpWeb) FAQ

func (this *HttpWeb) FAQ(params martini.Params, r render.Render)

func (*HttpWeb) Home

func (this *HttpWeb) Home(params martini.Params, r render.Render)

func (*HttpWeb) LongQueries added in v1.1.2

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

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)

func (*HttpWeb) Seeds added in v1.1.2

func (this *HttpWeb) Seeds(params martini.Params, r render.Render)

Jump to

Keyboard shortcuts

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