Documentation ¶
Index ¶
- Constants
- func NewMetricMetadataHandler(client metadata.UnaryClient, enablePartialResponse bool) func(*http.Request) (interface{}, []error, *api.ApiError)
- func NewRulesHandler(client rules.UnaryClient, enablePartialResponse bool) func(*http.Request) (interface{}, []error, *api.ApiError)
- type QueryAPI
Constants ¶
View Source
const ( DedupParam = "dedup" PartialResponseParam = "partial_response" MaxSourceResolutionParam = "max_source_resolution" ReplicaLabelsParam = "replicaLabels[]" MatcherParam = "match[]" StoreMatcherParam = "storeMatch[]" Step = "step" )
Variables ¶
This section is empty.
Functions ¶
func NewMetricMetadataHandler ¶ added in v0.19.0
func NewRulesHandler ¶
func NewRulesHandler(client rules.UnaryClient, enablePartialResponse bool) func(*http.Request) (interface{}, []error, *api.ApiError)
NewRulesHandler created handler compatible with HTTP /api/v1/rules https://prometheus.io/docs/prometheus/latest/querying/api/#rules which uses gRPC Unary Rules API.
Types ¶
type QueryAPI ¶
type QueryAPI struct {
// contains filtered or unexported fields
}
QueryAPI is an API used by Thanos Querier.
func NewQueryAPI ¶
func NewQueryAPI( logger log.Logger, storeSet *query.StoreSet, qe func(int64) *promql.Engine, c query.QueryableCreator, ruleGroups rules.UnaryClient, metadatas metadata.UnaryClient, enableAutodownsampling bool, enableQueryPartialResponse bool, enableRulePartialResponse bool, enableMetricMetadataPartialResponse bool, replicaLabels []string, flagsMap map[string]string, defaultRangeQueryStep time.Duration, defaultInstantQueryMaxSourceResolution time.Duration, defaultMetadataTimeRange time.Duration, gate gate.Gate, ) *QueryAPI
NewQueryAPI returns an initialized QueryAPI type.
func (*QueryAPI) Register ¶
func (qapi *QueryAPI) Register(r *route.Router, tracer opentracing.Tracer, logger log.Logger, ins extpromhttp.InstrumentationMiddleware, logMiddleware *logging.HTTPServerMiddleware)
Register the API's endpoints in the given router.
Click to show internal directories.
Click to hide internal directories.