worker

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: AGPL-3.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewQuerierWorker

func NewQuerierWorker(cfg Config, rng ring.ReadRing, handler RequestHandler, logger log.Logger, reg prometheus.Registerer, codec RequestCodec) (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"`
	MaxConcurrent    int           `yaml:"-"` // same as querier.max-concurrent.

	QuerierID string `yaml:"id"`

	NewQueryFrontendGRPCClientConfig grpcclient.Config `` /* 192-byte string literal not displayed */
	OldQueryFrontendGRPCClientConfig grpcclient.Config `` /* 254-byte string literal not displayed */

	QuerySchedulerGRPCClientConfig grpcclient.Config `` /* 194-byte string literal not displayed */
}

func (*Config) RegisterFlags

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

func (*Config) Validate

func (cfg *Config) Validate() error

type Metrics

type Metrics struct {
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(_ Config, r prometheus.Registerer) *Metrics

type RequestCodec

type RequestCodec interface {
	DecodeHTTPGrpcRequest(context.Context, *httpgrpc.HTTPRequest) (queryrangebase.Request, context.Context, error)
	QueryRequestUnwrap(context.Context, *queryrange.QueryRequest) (queryrangebase.Request, context.Context, error)
}

Decodes httpgrpc.HTTPRequests or QueryRequests to queryrangebase.Requests. This is used by the frontend and scheduler processor.

type RequestHandler

type RequestHandler interface {
	Do(context.Context, queryrangebase.Request) (queryrangebase.Response, error)
}

Handler 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