metric

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

package metric represents Prometheus metric samples as objects.

Class

There is only one class: `metric:metric`

Object

A metric sample, which includes a metric time series (name and labels), a timestamp and a value.

Query

Queries are PromQL time series selector strings, prefixed by `metric:metric:` for example:

metric:metric:http_requests_total{environment=~"staging|testing|development",method!="GET"}

Store

Prometheus is the store, store configuration:

domain: metric
metric: URL_OF_PROMETHEUS

Index

Constants

View Source
const StoreKeyMetricURL = "metric"

Variables

View Source
var (
	Domain = domain{}
)

Functions

func NewStore

func NewStore(baseURL string, hc *http.Client) (korrel8r.Store, error)

Types

type Class

type Class struct{} // Singleton class

func (Class) Description added in v0.1.2

func (c Class) Description() string

func (Class) Domain

func (c Class) Domain() korrel8r.Domain

func (Class) Name added in v0.1.2

func (c Class) Name() string

func (Class) New

func (c Class) New() korrel8r.Object

func (Class) Preview added in v0.5.0

func (c Class) Preview(o korrel8r.Object) string

func (Class) String

func (c Class) String() string

type Object

type Object *model.Sample

type Query

type Query struct {
	PromQL string // `json:",omitempty"`
}

func (Query) Class

func (q Query) Class() korrel8r.Class

func (Query) Data added in v0.6.0

func (q Query) Data() string

func (Query) String

func (q Query) String() string

type Store

type Store struct {
	// contains filtered or unexported fields
}

func (*Store) Domain

func (s *Store) Domain() korrel8r.Domain

func (*Store) Get

func (s *Store) Get(ctx context.Context, query korrel8r.Query, c *korrel8r.Constraint, result korrel8r.Appender) error

Jump to

Keyboard shortcuts

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