Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetricValue ¶
func GetMetricValue(metrics NodeMetrics, name string, labels prometheus.Labels) (float64, bool)
GetMetricValue returns the value of the specified metric which has the required labels.
If multiple metrics match the provided labels, the first metric found is returned.
Only Counter and Gauge metrics are supported.
func Outf ¶ added in v1.1.11
func Outf(format string, args ...interface{})
Outputs to stdout.
Examples:
- Out("{{green}}{{bold}}hi there %q{{/}}", "aa")
- Out("{{magenta}}{{bold}}hi therea{{/}} {{cyan}}{{underline}}b{{/}}")
See https://github.com/onsi/ginkgo/blob/v2.0.0/formatter/formatter.go#L52-L73 for an exhaustive list of color options.
Types ¶
type NodeMetrics ¶
type NodeMetrics map[string]*dto.MetricFamily
"metric name" -> "metric value"
func GetNodeMetrics ¶
func GetNodeMetrics(ctx context.Context, nodeURI string) (NodeMetrics, error)
GetNodeMetrics retrieves the specified metrics the provided node URI.
type NodesMetrics ¶
type NodesMetrics map[string]NodeMetrics
URI -> "metric name" -> "metric value"
func GetNodesMetrics ¶
func GetNodesMetrics(ctx context.Context, nodeURIs []string) (NodesMetrics, error)
GetNodesMetrics retrieves the specified metrics for the provided node URIs.
type SimpleNodeMetrics ¶ added in v1.1.11
"metric name" -> "metric value"
func GetMetricsValue ¶ added in v1.1.11
func GetMetricsValue(url string, metrics ...string) (SimpleNodeMetrics, error)
func GetSimpleNodeMetrics ¶ added in v1.1.11
func GetSimpleNodeMetrics(nodeURI string, metricNames ...string) (SimpleNodeMetrics, error)
GetSimpleNodeMetrics retrieves the specified metrics the provided node URI.
type SimpleNodesMetrics ¶ added in v1.1.11
type SimpleNodesMetrics map[string]SimpleNodeMetrics
URI -> "metric name" -> "metric value"
func GetSimpleNodesMetrics ¶ added in v1.1.11
func GetSimpleNodesMetrics(nodeURIs []string, metricNames ...string) (SimpleNodesMetrics, error)
GetSimpleNodesMetrics retrieves the specified metrics for the provided node URIs.
Directories
¶
| Path | Synopsis |
|---|---|
|
luxd/gencomposeconfig
command
|
|
|
xsvm/gencomposeconfig
command
|
|
|
c
AUTOMATICALLY GENERATED.
|
AUTOMATICALLY GENERATED. |
|
tmpnet/cmd
command
|
|