history

package
v0.0.0-...-76698d7 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_MAX_QUERY_SIZE = 1 << 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HistoryProvider

type HistoryProvider interface {
	Query(ctx context.Context, expression string) (metric.HistoryMetric, error)
	QueryRange(ctx context.Context, expression string, duration time.Duration) (metric.HistoryMetric, error)
}

type PrometheusHistoryProvider

type PrometheusHistoryProvider struct {
	ClientAPI    prometheusv1.API
	QueryStep    time.Duration
	QueryMaxSize int
}

func NewPrometheusHistoryProvider

func NewPrometheusHistoryProvider(config PrometheusHistoryProviderConfig) (provider PrometheusHistoryProvider, err error)

func (*PrometheusHistoryProvider) AddPromethuesModelToHistoryMetric

func (p *PrometheusHistoryProvider) AddPromethuesModelToHistoryMetric(promeValue promethuesmodel.Value, metricHistoryMetric *metric.HistoryMetric)

func (*PrometheusHistoryProvider) Query

can

func (*PrometheusHistoryProvider) QueryRange

func (p *PrometheusHistoryProvider) QueryRange(ctx context.Context, expression string, duration time.Duration) (metric.HistoryMetric, error)

type PrometheusHistoryProviderConfig

type PrometheusHistoryProviderConfig struct {
	Address      string
	QueryTimeout time.Duration
	QueryStep    time.Duration
}

Jump to

Keyboard shortcuts

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