worker

package
v0.0.0-...-db2fa2f Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: AGPL-3.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResponseStreamingEnabledHeader is the header key used by http handlers to
	// indicate to the scheduler processor that its response should be streamed. This
	// header is internal to the querier only and removed before the response is sent
	// over the network.
	ResponseStreamingEnabledHeader = "X-Mimir-Stream-Grpc-Response"
)

Variables

This section is empty.

Functions

func NewQuerierWorker

func NewQuerierWorker(cfg Config, handler RequestHandler, log log.Logger, reg prometheus.Registerer) (services.Service, error)

Types

type Config

type Config struct {
	FrontendAddress                string            `yaml:"frontend_address"`
	SchedulerAddress               string            `yaml:"scheduler_address"`
	DNSLookupPeriod                time.Duration     `yaml:"dns_lookup_duration" category:"advanced"`
	QuerierID                      string            `yaml:"id" category:"advanced"`
	QueryFrontendGRPCClientConfig  grpcclient.Config `` /* 134-byte string literal not displayed */
	QuerySchedulerGRPCClientConfig grpcclient.Config `` /* 151-byte string literal not displayed */
	ResponseStreamingEnabled       bool              `yaml:"response_streaming_enabled" category:"experimental"`

	// This configuration is injected internally.
	MaxConcurrentRequests   int                       `yaml:"-"` // Must be same as passed to PromQL Engine.
	QuerySchedulerDiscovery schedulerdiscovery.Config `yaml:"-"`
}

func (*Config) IsFrontendOrSchedulerConfigured

func (cfg *Config) IsFrontendOrSchedulerConfigured() bool

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) Validate

func (cfg *Config) Validate() error

type RequestHandler

type RequestHandler interface {
	Handle(context.Context, *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)
}

RequestHandler for HTTP requests wrapped in protobuf messages.

Jump to

Keyboard shortcuts

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