v1

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardUsage added in v0.6.0

type DashboardUsage struct {
	ID   string `json:"uid"`
	Name string `json:"title"`
	URL  string `json:"url"`
}

type LogError added in v0.4.0

type LogError struct {
	Message string
	Warning error
	Error   error
}

func (*LogError) Log added in v0.4.0

func (l *LogError) Log(logger *logrus.Entry)

type Metric

type Metric struct {
	Labels Set[string]  `json:"labels,omitempty"`
	Usage  *MetricUsage `json:"usage,omitempty"`
}

type MetricUsage

type MetricUsage struct {
	Dashboards     Set[DashboardUsage] `json:"dashboards,omitempty"`
	RecordingRules Set[RuleUsage]      `json:"recordingRules,omitempty"`
	AlertRules     Set[RuleUsage]      `json:"alertRules,omitempty"`
}

func MergeUsage added in v0.5.0

func MergeUsage(old, new *MetricUsage) *MetricUsage

type PartialMetric added in v0.5.0

type PartialMetric struct {
	Usage           *MetricUsage   `json:"usage,omitempty"`
	MatchingMetrics Set[string]    `json:"matchingMetrics,omitempty"`
	MatchingRegexp  *common.Regexp `json:"matchingRegexp,omitempty"`
}

type RuleUsage

type RuleUsage struct {
	PromLink   string `json:"prom_link"`
	GroupName  string `json:"group_name"`
	Name       string `json:"name"`
	Expression string `json:"expression"`
}

type Set added in v0.5.0

type Set[T comparable] map[T]struct{}

func MergeSet added in v0.5.0

func MergeSet[T comparable](old, new Set[T]) Set[T]

func NewSet added in v0.5.0

func NewSet[T comparable](vals ...T) Set[T]

func (Set[T]) Add added in v0.5.0

func (s Set[T]) Add(vals ...T)

func (Set[T]) Contains added in v0.5.0

func (s Set[T]) Contains(value T) bool

func (Set[T]) MarshalJSON added in v0.5.0

func (s Set[T]) MarshalJSON() ([]byte, error)

func (Set[T]) Merge added in v0.5.0

func (s Set[T]) Merge(other Set[T])

func (Set[T]) Remove added in v0.5.0

func (s Set[T]) Remove(value T)

func (Set[T]) TransformAsSlice added in v0.5.0

func (s Set[T]) TransformAsSlice() []T

func (*Set[T]) UnmarshalJSON added in v0.5.0

func (s *Set[T]) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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