v2

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 29 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SchedulerAddress                  string            `yaml:"scheduler_address"`
	DNSLookupPeriod                   time.Duration     `yaml:"scheduler_dns_lookup_period"`
	WorkerConcurrency                 int               `yaml:"scheduler_worker_concurrency"`
	GRPCClientConfig                  grpcclient.Config `yaml:"grpc_client_config"`
	RetryOnTooManyOutstandingRequests bool              `yaml:"retry_on_too_many_outstanding_requests"`

	// Used to find local IP address, that is sent to scheduler and querier-worker.
	InfNames []string `yaml:"instance_interface_names"`

	// If set, address is not computed from interfaces.
	Addr string `yaml:"address" doc:"hidden"`
	Port int    `doc:"hidden"`
}

Config for a Frontend.

func (*Config) RegisterFlags

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

type Frontend

type Frontend struct {
	services.Service
	// contains filtered or unexported fields
}

Frontend implements GrpcRoundTripper. It queues HTTP requests, dispatches them to backends via gRPC, and handles retries for requests which failed.

func NewFrontend

func NewFrontend(cfg Config, limits scheduler.Limits, log log.Logger, reg prometheus.Registerer, retry *transport.Retry) (*Frontend, error)

NewFrontend creates a new frontend.

func (*Frontend) CheckReady

func (f *Frontend) CheckReady(_ context.Context) error

CheckReady determines if the query frontend is ready. Function parameters/return chosen to match the same method in the ingester

func (*Frontend) RoundTripGRPC

func (f *Frontend) RoundTripGRPC(ctx context.Context, req *httpgrpc.HTTPRequest) (*httpgrpc.HTTPResponse, error)

RoundTripGRPC round trips a proto (instead of a HTTP request).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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