prom

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrometheusClientID = "prom"
	// max number of points each time series of prometheus
	PrometheusPointsLimitPerTimeSeries = 11000
)

Variables

This section is empty.

Functions

func ComputeWindowShards added in v0.3.0

func ComputeWindowShards(window *promapiv1.Range, maxPointsLimitPerTimeSeries int) []*promapiv1.Range

func MergeSortedTimeSeries added in v0.3.0

func MergeSortedTimeSeries(ts1, ts2 *common.TimeSeries) *common.TimeSeries

func NewContext

func NewContext(client prometheus.Client, maxPointsPerTimeSeries int) *context

NewContext creates a new Prometheus querying context from the given client.

func NewContextByAPI added in v0.3.0

func NewContextByAPI(api promapiv1.API, maxPointsPerTimeSeries int) *context

Test use

func NewPrometheusClient

func NewPrometheusClient(config *providers.PromConfig) (prometheus.Client, error)

NewPrometheusClient returns a prometheus.Client

Types

type FlowControlRuntime added in v0.3.0

type FlowControlRuntime struct {
	// Current InfFight limit.
	InFightLimit int
	// Current InfFight requests.
	InFight int
}

func (*FlowControlRuntime) String added in v0.3.0

func (fcr *FlowControlRuntime) String() string

type Provider added in v0.7.0

type Provider interface {
	providers.Interface

	GetPromClient() promapiv1.API
}

func NewProvider

func NewProvider(config *providers.PromConfig) (Provider, error)

NewProvider return a prometheus data provider

type QueryShardResult added in v0.3.0

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

type QueryShards added in v0.3.0

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

shard by time slice only, because we can not decide what the query is, how many time series it will return, it depends on the application level.

Jump to

Keyboard shortcuts

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