Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLuxMetrics ¶ added in v1.14.2
func CreateLuxMetrics(namespace string) luxmetrics.Metrics
CreateLuxMetrics creates a Lux metrics instance with a prometheus backend
func GetPrometheusRegistry ¶ added in v1.14.2
func GetPrometheusRegistry(metrics luxmetrics.Metrics) (*prometheus.Registry, bool)
GetPrometheusRegistry extracts the prometheus registry from Lux metrics
func MakeAndRegister ¶ added in v0.1.1
func MakeAndRegister(gatherer MultiGatherer, name string) (*prometheus.Registry, error)
Types ¶
type Client ¶ added in v0.1.1
type Client struct {
// contains filtered or unexported fields
}
Client for requesting metrics from a remote Lux instance
func (*Client) GetMetrics ¶ added in v0.1.1
GetMetrics returns the metrics from the connected node. The metrics are returned as a map of metric family name to the metric family.
type LuxMultiGatherer ¶ added in v1.14.2
type LuxMultiGatherer struct {
// contains filtered or unexported fields
}
LuxMultiGatherer adapts Lux metrics MultiGatherer to prometheus MultiGatherer
func (*LuxMultiGatherer) Deregister ¶ added in v1.14.2
func (l *LuxMultiGatherer) Deregister(name string) bool
Deregister implements MultiGatherer
func (*LuxMultiGatherer) Gather ¶ added in v1.14.2
func (l *LuxMultiGatherer) Gather() ([]*dto.MetricFamily, error)
Gather implements prometheus.Gatherer
func (*LuxMultiGatherer) Register ¶ added in v1.14.2
func (l *LuxMultiGatherer) Register(name string, gatherer prometheus.Gatherer) error
Register implements MultiGatherer
type MultiGatherer ¶ added in v0.1.1
type MultiGatherer interface {
prometheus.Gatherer
// Register adds the outputs of [gatherer] to the results of future calls to
// Gather with the provided [name] added to the metrics.
Register(name string, gatherer prometheus.Gatherer) error
// Deregister removes the outputs of a gatherer with [name] from the results
// of future calls to Gather. Returns true if a gatherer with [name] was
// found.
Deregister(name string) bool
}
MultiGatherer extends the Gatherer interface by allowing additional gatherers to be registered.
func NewLabelGatherer ¶ added in v0.1.1
func NewLabelGatherer(labelName string) MultiGatherer
NewLabelGatherer returns a new MultiGatherer that merges metrics by adding a new label.
func NewLuxMetricsMultiGatherer ¶ added in v1.14.2
func NewLuxMetricsMultiGatherer() MultiGatherer
NewLuxMetricsMultiGatherer creates a MultiGatherer using Lux metrics
func NewLuxMultiGatherer ¶ added in v1.14.2
func NewLuxMultiGatherer(gatherer luxmetrics.MultiGatherer) MultiGatherer
NewLuxMultiGatherer creates a new adapter
func NewPrefixGatherer ¶ added in v0.1.1
func NewPrefixGatherer() MultiGatherer
NewPrefixGatherer returns a new MultiGatherer that merges metrics by adding a prefix to their names.