http

package
v0.0.0-...-6b32d26 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 42 Imported by: 0

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.

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.

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.

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

View Source
const TimeFormat = "2006-01-02 15:04:05"

Variables

View Source
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

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

ClusterInfo provides details of a given cluster

func ActiveClusterRecovery

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

ActiveClusterRecovery returns recoveries in-progress for a given cluster

func AgentHealthCheck

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

Agent returns complete information of a given agent

func AllInstances

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

AllInstances lists all known instances

func AsyncDiscover

func 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 Audit

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

Audit provides list of audit entries by given page number

func AuditFailureDetection

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

AuditFailureDetection provides list of tham_opology_failure_detection entries

func AuditRecovery

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

AuditRecovery provides list of topology-recovery entries

func AuditRecoverySteps

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

AuditRecoverySteps returns audited steps of a given recovery

func AutomatedRecoveryFilters

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

AutomatedRecoveryFilters retuens list of clusters which are configured with automated recovery

func BackendQueryMetricsAggregated

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

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

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

BeginDowntime sets a downtime flag with default duration

func BeginMaintenance

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

BeginMaintenance begins maintenance mode for given instance

func BlockedRecoveries

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

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

func BulkInstances

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

BulkInstances returns a list of all known instances

func BulkPromotionRules

func 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 CacheHit

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

CacheHit show cache hit rate

func CanReplicateFrom

func 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 Check

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

Check issues a synchronous read on an instance

func CheckGlobalRecoveries

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

CheckGlobalRecoveries checks whether

func Cluster

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

Cluster provides list of instances in given cluster

func ClusterByAlias

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

ClusterByAlias provides list of instances in given cluster

func ClusterByInstance

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

ClusterByInstance provides list of instances in cluster an instance belongs to

func ClusterInfo

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

ClusterInfo provides details of a given cluster

func ClusterInfoByAlias

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

Cluster provides list of instances in given cluster

func ClusterMaster

func ClusterMaster(params martini.Params, r render.Render, req *http.Request)

ClusterMaster returns the writable master of a given cluster

func Clusters

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

Clusters provides list of known clusters

func ClustersInfo

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

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

func CustomMartini

func CustomMartini() *martini.ClassicMartini

CustomMartini

func DelayReplication

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

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 DisableSemiSyncMaster(params martini.Params, r render.Render, req *http.Request, user auth.User)

func DisableSemiSyncReplica

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

func Discover

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

Discover issues a synchronous read on an instance

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

func 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 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 Downtimed

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

Downtimed lists downtimed instances, potentially filtered by cluster

func EnableGlobalRecoveries

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

EnableGlobalRecoveries globally enables recoveries

func EnableSemiSyncMaster

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

func EnableSemiSyncReplica

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

func EndDowntime

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

EndDowntime terminates downtime (removes downtime flag) for an instance

func EndMaintenance

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

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

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

ForceMasterFailover fails over a master (even if there's no particular problem with the master)

func ForceMasterTakeover

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

ForceMasterTakeover fails over a master (even if there's no particular problem with the master)

func Forget

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

Forget removes an instance entry fro backend database

func ForgetCluster

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

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

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

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 Headers

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

Headers is a self-test call which returns HTTP headers

func Health

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

Health performs a self test

func HostnameResolveCache

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

HostnameResolveCache shows content of in-memory hostname cache

func Http

func Http(continuousDiscovery bool)

Http starts serving

func InMaintenance

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

EndMaintenanceByInstanceKey terminates maintenance mode for given instance

func InfoSync

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

InfoSync returns sync info for node

func Instance

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

Instance reads and returns an instance's details.

func InstanceReplicas

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

InstanceReplicas lists all replicas of given instance

func KillQuery

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

KillQuery kills a query running on a server

func LBCheck

func 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 LeaderCheck

func 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 ListAPI

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

Show all api registered

func Maintenance

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

Maintenance provides list of instance under active maintenance

func MakeCoMaster

func 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 MakeLocalMaster

func 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 MakeMaster

func 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 Masters

func Masters(params martini.Params, r render.Render, req *http.Request)

Clusters provides list of known masters

func MatchBelow

func 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 MatchUp

func 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 MatchUpReplicas

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

MatchUpReplicas attempts to match up all replicas of an instance

func MoveBelow

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

MoveBelow attempts to move an instance below its supposed sibling

func MoveEquivalent

func 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 MoveUp

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

MoveUp attempts to move an instance up the topology

func MoveUpReplicas

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

MoveUpReplicas attempts to move up all replicas of an instance

func MultiMatchReplicas

func 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 Problems

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

Problems provides list of instances with known problems

func RaftAddPeer

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

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

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

RaftHealth indicates whether this node is part of a healthy raft group

func RaftLeader

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

RaftLeader returns the identify of the leader, if possible

func RaftPeers

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

RaftPeers returns the list of peers in a raft setup

func RaftRemovePeer

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

RaftAddPeer removes a node fro the raft cluster

func RaftSnapshot

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

RaftSnapshot instructs raft to take a snapshot

func RaftState

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

RaftState returns the state of this raft node

func RaftStatus

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

RaftStatus exports a status summary for a raft node

func RaftYield

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

RaftYield yields to a specified host

func RaftYieldHint

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

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

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

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

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

RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster

func RecentlyActiveInstanceRecovery

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

RecentlyActiveClusterRecovery returns recoveries in-progress for a given cluster

func Recover

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

Recover attempts recovery on a given instance

func RecoverLite

func 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 Reelect

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

Reelect causes re-elections for an active node

func Refresh

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

Refresh synchronuously re-reads a topology instance

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

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

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

func 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 ReloadClusterAlias

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

ReloadClusterAlias clears in-memory hostname resovle cache

func ReloadConfiguration

func 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 RelocateBelow

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

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

func RelocateReplicas

func 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 ReplicationAnalysis

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

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

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

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

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

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

func Resolve

func 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 RestartReplication

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

RestartReplication stops & starts replication on given instance

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

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

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

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

SetReadOnly sets the global read_only variable

func SetWriteable

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

SetWriteable clear the global read_only variable

func SkipQuery

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

SkipQuery skips a single query on a failed replication instance

func StartReplication

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

StartReplication starts replication on given instance

func StatusCheck

func 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 StopReplication

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

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

func SubmitMastersToKvStores(params martini.Params, r render.Render, req *http.Request)

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

func 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 Tag

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

Tags adds a tag to a given instance

func TagValue

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

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

func Tagged

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

Tagged return instance keys tagged by "tag" query param

func Tags

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

Tags lists existing tags for a given instance

func TakeMaster

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

TakeMaster

func TakeSiblings

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

TakeSiblings

func Topology

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

Topology returns an graph of cluster's instances

func TopologySnapshot

func TopologySnapshot(params martini.Params, r render.Render, req *http.Request)

TopologySnapshot triggers ham4db to record a snapshot of host/master for all known hosts.

func TopologyTabulated

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

TopologyTabulated returns an graph of cluster's instances

func TopologyWithTag

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

TopologyWithTag returns an graph of cluster's instances and instance tags

func Untag

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

Untag removes a tag from an instance

func UntagAll

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

UntagAll removes a tag from all matching instances

func Verify

func Verify(r *nethttp.Request, validOUs []string) error

Verify that the OU of the presented client certificate matches the list of Valid OUs

func VerifyOUs

func VerifyOUs(validOUs []string) martini.Handler

TODO: make this testable?

func WriteBufferMetricsAggregated

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

WriteBufferMetricsAggregated provides aggregate metric of instance write buffer metric

func WriteBufferMetricsRaw

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

WriteBufferMetricsRaw returns the raw instance write buffer metric

Types

type HttpWeb

type HttpWeb struct {
	URLPrefix string
}

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

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