mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-07 10:17:51 +00:00
Tons of movement. See notes.
* Renamed `MetricNamer` to `SeriesConverter` and renamed `MetricNameConverter` to `MetricNamer`. * Simplified the `metricConverter` code. * Greatly simplified the `externalSeriesRegistry` and removed the `externalInfoMap` code. * Fixed doc comment format. * Still several `TODO`s to address.
This commit is contained in:
parent
a94494337e
commit
d1827c5611
28 changed files with 1106 additions and 1006 deletions
|
|
@ -17,9 +17,9 @@ import (
|
|||
pmodel "github.com/prometheus/common/model"
|
||||
)
|
||||
|
||||
//ResourceConverter is a type for extracting associated Kubernetes GroupResource objects from
|
||||
//Prometheus series and generating appropriate labels to target specific Kubernetes GroupResource
|
||||
//objects.
|
||||
// ResourceConverter is a type for extracting associated Kubernetes GroupResource objects from
|
||||
// Prometheus series and generating appropriate labels to target specific Kubernetes GroupResource
|
||||
// objects.
|
||||
type ResourceConverter interface {
|
||||
// ResourcesForSeries returns the group-resources associated with the given series,
|
||||
// as well as whether or not the given series has the "namespace" resource).
|
||||
|
|
@ -37,7 +37,7 @@ type resourceConverter struct {
|
|||
labelTemplate *template.Template
|
||||
}
|
||||
|
||||
//NewResourceConverter creates a ResourceConverter that will use the provided parameters to map data between Prometheus and Kubernetes.
|
||||
// NewResourceConverter creates a ResourceConverter that will use the provided parameters to map data between Prometheus and Kubernetes.
|
||||
func NewResourceConverter(resourceTemplate string, overrides map[string]config.GroupResource, mapper apimeta.RESTMapper) (ResourceConverter, error) {
|
||||
converter := &resourceConverter{
|
||||
labelToResource: make(map[pmodel.LabelName]schema.GroupResource),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue