bird_exporter/metrics/legacy_label_strategy.go
2020-02-18 19:55:16 +01:00

19 lines
394 B
Go

package metrics
import "github.com/czerwonk/bird_exporter/protocol"
type LegacyLabelStrategy struct {
}
func NewLegacyLabelStrategy() *LegacyLabelStrategy {
return &LegacyLabelStrategy{}
}
func (*LegacyLabelStrategy) LabelNames(p *protocol.Protocol) []string {
return []string{"name"}
}
func (*LegacyLabelStrategy) LabelValues(p *protocol.Protocol) []string {
return []string{p.Name}
}