worker

package
v0.0.0-weekly-f4-test-... Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: AGPL-3.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 {
	SchedulerAddress string            `yaml:"scheduler_address" doc:"hidden"`
	DNSLookupPeriod  time.Duration     `yaml:"dns_lookup_duration" category:"advanced" doc:"hidden"`
	QuerierID        string            `yaml:"id" category:"advanced"`
	GRPCClientConfig grpcclient.Config `` /* 155-byte string literal not displayed */

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

func (*Config) RegisterFlags

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

func (*Config) Validate

func (cfg *Config) Validate(log log.Logger) 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