query

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Multi

func Multi(ctx context.Context, url string, query MultiQueryConfig, httpClient *http.Client) ([]prommodel.Value, error)

func Product

func Product(ctx context.Context, query ProductQueryConfig, httpClient *http.Client) ([]prommodel.Value, error)

func Single

func Single(ctx context.Context, url string, query QueryConfig, httpClient *http.Client) (prommodel.Value, error)

Types

type MetricDump added in v0.2.0

type MetricDump struct {
	MetricInfo
	Labels []string `json:"labels"`
}

func MetricsWithLabels added in v0.2.0

func MetricsWithLabels(ctx context.Context, url string, httpClient *http.Client) ([]MetricDump, error)

type MetricInfo added in v0.2.0

type MetricInfo struct {
	Name string `json:"name"`
	Help string `json:"help"`
}

type MultiQueryConfig

type MultiQueryConfig struct {
	Timerange
	Queries []string
}

type ProductQueryConfig

type ProductQueryConfig struct {
	MultiQueryConfig
	URLs []string
}

type QueryConfig

type QueryConfig struct {
	Timerange
	Query string
}

type Timerange

type Timerange struct {
	Start time.Time
	End   time.Time
	Step  time.Duration
}

Jump to

Keyboard shortcuts

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