metricsparser

package
v0.89.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComments

func GetComments(reg *markers.Registry, ruleNode *yaml.Node) (string, string)

func ParseTemplateFile

func ParseTemplateFile() []byte

Types

type Comment

type Comment struct {
	Summary string
	Type    string
}

type Metric

type Metric struct {
	Name        string
	Description string
	MType       string
}

func MetricDescriptionToMetric

func MetricDescriptionToMetric(rrd monitoring.MetricsOpts) Metric

func (Metric) WriteOut

func (m Metric) WriteOut()

type MetricList

type MetricList []Metric

func MetricsOptsToMetricList

func MetricsOptsToMetricList(Metrics map[monitoring.MetricsKey]monitoring.MetricsOpts, result MetricList) MetricList

func ReadFromPrometheusCR

func ReadFromPrometheusCR() MetricList

func (MetricList) Len

func (m MetricList) Len() int

Len implements sort.Interface.Len

func (MetricList) Less

func (m MetricList) Less(i, j int) bool

Less implements sort.Interface.Less

func (MetricList) Swap

func (m MetricList) Swap(i, j int)

Swap implements sort.Interface.Swap

func (MetricList) WriteOut

func (m MetricList) WriteOut()

type PrometheusCR

type PrometheusCR struct {
	Spec struct {
		Groups []struct {
			Name  string      `yaml:"name"`
			Rules []yaml.Node `yaml:"rules"`
		} `yaml:"groups"`
	} `yaml:"spec"`
}

type Rule

type Rule struct {
	Record string `yaml:"record,omitempty"`
}

Jump to

Keyboard shortcuts

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