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 *datasource.PromConfig) (prometheus.Client, error)
- func NewProvider(config *datasource.PromConfig) (datasource.Interface, error)
- type FlowControlRuntime
- type QueryShardResult
- type QueryShards
- type ThanosConfig
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 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 ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.