v1

package
v0.16.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2020 License: Apache-2.0 Imports: 26 Imported by: 4

Documentation

Index

Constants

View Source
const (
	DedupParam               = "dedup"
	PartialResponseParam     = "partial_response"
	MaxSourceResolutionParam = "max_source_resolution"
	ReplicaLabelsParam       = "replicaLabels[]"
	StoreMatcherParam        = "storeMatch[]"
)

Variables

This section is empty.

Functions

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 Query.

func NewQueryAPI

func NewQueryAPI(
	logger log.Logger,
	storeSet *query.StoreSet,
	qe *promql.Engine,
	c query.QueryableCreator,
	ruleGroups rules.UnaryClient,
	enableAutodownsampling bool,
	enableQueryPartialResponse bool,
	enableRulePartialResponse bool,
	replicaLabels []string,
	flagsMap map[string]string,
	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.

Jump to

Keyboard shortcuts

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