Documentation ¶
Index ¶
- Constants
- func ComputeWindowShards(window *promapiv1.Range, maxPointsLimitPerTimeSeries int) []*promapiv1.Range
- func MergeSortedTimeSeries(ts1, ts2 *common.TimeSeries) *common.TimeSeries
- func NewContext(client prometheus.Client, maxPointsPerTimeSeries int) *context
- func NewContextByAPI(api promapiv1.API, maxPointsPerTimeSeries int) *context
- func NewPrometheusClient(config *providers.PromConfig) (prometheus.Client, error)
- type FlowControlRuntime
- type Provider
- type QueryShardResult
- type QueryShards
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 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
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
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.
Click to show internal directories.
Click to hide internal directories.