Documentation ¶
Index ¶
Constants ¶
View Source
const (
// StatusClientClosedRequest is the status code for when a client request cancellation of an http request
StatusClientClosedRequest = 499
)
Variables ¶
This section is empty.
Functions ¶
func NewRoundTripper ¶
func NewRoundTripper(next http.RoundTripper, middlewares ...Middleware) http.RoundTripper
NewRoundTripper takes an ordered set of middlewares and builds a http.RoundTripper around them
Types ¶
type Config ¶
type Config struct { Config frontend.CombinedFrontendConfig `yaml:",inline"` MaxRetries int `yaml:"max_retries,omitempty"` QueryShards int `yaml:"query_shards,omitempty"` TolerateFailedBlocks int `yaml:"tolerate_failed_blocks,omitempty"` Search SearchSharderConfig `yaml:"search"` }
type CortexNoQuerierLimits ¶ added in v0.6.0
type CortexNoQuerierLimits struct{}
func (CortexNoQuerierLimits) MaxQueriersPerUser ¶ added in v0.6.0
func (CortexNoQuerierLimits) MaxQueriersPerUser(user string) int
type Middleware ¶
type Middleware interface {
Wrap(http.RoundTripper) http.RoundTripper
}
Middleware is used to build pipelines of http.Roundtrippers
func MergeMiddlewares ¶
func MergeMiddlewares(middleware ...Middleware) Middleware
MergeMiddlewares takes a set of ordered middlewares and merges them into a pipeline
type MiddlewareFunc ¶
type MiddlewareFunc func(http.RoundTripper) http.RoundTripper
MiddlewareFunc is like http.HandlerFunc, but for Middleware.
func (MiddlewareFunc) Wrap ¶
func (q MiddlewareFunc) Wrap(h http.RoundTripper) http.RoundTripper
Wrap implements Middleware.
type QueryFrontend ¶ added in v1.2.0
type QueryFrontend struct {
TraceByID, Search http.Handler
// contains filtered or unexported fields
}
func New ¶ added in v1.2.0
func New(cfg Config, next http.RoundTripper, store storage.Store, logger log.Logger, registerer prometheus.Registerer) (*QueryFrontend, error)
New returns a new QueryFrontend
type RoundTripperFunc ¶ added in v1.2.0
RoundTripperFunc is like http.HandlerFunc, but for RoundTripper
chosen for pipeline building over queryrange.Handler b/c of how similar queryrange.Handler is to this existing interface.
type SearchSharderConfig ¶ added in v1.3.0
type SearchSharderConfig struct { ConcurrentRequests int `yaml:"concurrent_jobs,omitempty"` TargetBytesPerRequest int `yaml:"target_bytes_per_job,omitempty"` DefaultLimit uint32 `yaml:"default_result_limit"` MaxLimit uint32 `yaml:"max_result_limit"` MaxDuration time.Duration `yaml:"max_duration"` QueryBackendAfter time.Duration `yaml:"query_backend_after,omitempty"` QueryIngestersUntil time.Duration `yaml:"query_ingesters_until,omitempty"` }
Click to show internal directories.
Click to hide internal directories.