prom

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 20 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

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

func MergeSortedTimeSeries

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

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

Test use

func NewPrometheusClient

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

NewPrometheusClient returns a prometheus.Client

func NewProvider

func NewProvider(config *datasource.PromConfig) (datasource.Interface, error)

NewProvider return a prometheus data provider

Types

type FlowControlRuntime

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

func (*FlowControlRuntime) String

func (fcr *FlowControlRuntime) String() string

type QueryShardResult

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

type QueryShards

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.

type ThanosConfig

type ThanosConfig struct {
	Partial bool
	Dedup   bool
}

Jump to

Keyboard shortcuts

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