Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterProbes ¶
type ClusterProbes struct { ClusterName string IgnoreHostsCount int IgnoreHostsThreshold float64 TabletProbes Probes }
ClusterProbes has the probes for a specific cluster
type ClusterTablet ¶ added in v0.19.0
ClusterTablet combines a cluster name with a tablet alias
func GetClusterTablet ¶ added in v0.19.0
func GetClusterTablet(clusterName string, alias string) ClusterTablet
GetClusterTablet creates a GetClusterTablet object
type Inventory ¶
type Inventory struct { ClustersProbes map[string](Probes) IgnoreHostsCount map[string]int IgnoreHostsThreshold map[string]float64 TabletMetrics TabletResultMap }
Inventory has the operational data about probes, their metrics, and relevant configuration
type MetricsQueryType ¶ added in v0.10.0
type MetricsQueryType int
MetricsQueryType indicates the type of metrics query on MySQL backend. See following.
const ( // MetricsQueryTypeDefault indicates the default, internal implementation. Specifically, our throttler runs a replication lag query MetricsQueryTypeDefault MetricsQueryType = iota // MetricsQueryTypeShowGlobal indicates SHOW GLOBAL (STATUS|VARIABLES) query MetricsQueryTypeShowGlobal // MetricsQueryTypeSelect indicates a custom SELECT query MetricsQueryTypeSelect // MetricsQueryTypeUnknown is an unknown query type, which we cannot run. This is an error MetricsQueryTypeUnknown )
func GetMetricsQueryType ¶ added in v0.10.0
func GetMetricsQueryType(query string) MetricsQueryType
GetMetricsQueryType analyzes the type of a metrics query
type MySQLThrottleMetric ¶
MySQLThrottleMetric has the probed metric for a tablet
func NewMySQLThrottleMetric ¶
func NewMySQLThrottleMetric() *MySQLThrottleMetric
NewMySQLThrottleMetric creates a new MySQLThrottleMetric
func ReadThrottleMetric ¶
func ReadThrottleMetric(probe *Probe, clusterName string, overrideGetMetricFunc func() *MySQLThrottleMetric) (mySQLThrottleMetric *MySQLThrottleMetric)
ReadThrottleMetric returns a metric for the given probe. Either by explicit query or via SHOW REPLICA STATUS
func (*MySQLThrottleMetric) Get ¶
func (metric *MySQLThrottleMetric) Get() (float64, error)
Get implements MetricResult
func (*MySQLThrottleMetric) GetClusterTablet ¶ added in v0.19.0
func (metric *MySQLThrottleMetric) GetClusterTablet() ClusterTablet
GetClusterTablet returns the ClusterTablet part of the metric
type Probe ¶
type Probe struct { Alias string MetricQuery string Tablet *topodatapb.Tablet CacheMillis int QueryInProgress int64 }
Probe is the minimal configuration required to connect to a MySQL server
type TabletResultMap ¶ added in v0.19.0
type TabletResultMap map[ClusterTablet]base.MetricResult
TabletResultMap maps a cluster-tablet to a result