metrics

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package metrics contains a client to query RBFS metrics

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	// QueryMetric queries a single metric.
	QueryMetric(ctx rbfs.RbfsContext, metric string) (*Metric, error)
}

Client provides access to the switch metrics.

func NewClient

func NewClient(c *http.Client) Client

NewClient creates a new client to query switch metrics.

type LabeledValue

type LabeledValue struct {
	// Value holds the metric value.
	Value float64
	// Labels contains the metric value.
	Labels map[string]string
}

LabeledValue contains a metric value with this assigned labels.

type Metric

type Metric struct {
	// MetricName holds the metric name.
	MetricName string
	// Values holds all metric values.
	Values []LabeledValue
}

Metric describes a single switch metric.

Jump to

Keyboard shortcuts

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