frontend

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2023 License: AGPL-3.0 Imports: 30 Imported by: 0

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" doc:"hidden"`
	DNSLookupPeriod   time.Duration     `yaml:"scheduler_dns_lookup_period" category:"advanced" doc:"hidden"`
	WorkerConcurrency int               `yaml:"scheduler_worker_concurrency" category:"advanced"`
	GRPCClientConfig  grpcclient.Config `` /* 144-byte string literal not displayed */

	// Used to find local IP address, that is sent to scheduler and querier-worker.
	InfNames []string `yaml:"instance_interface_names" category:"advanced" doc:"default=[<private network interfaces>]"`

	// If set, address is not computed from interfaces.
	Addr string `yaml:"address" category:"advanced"`
	Port int    `yaml:"-"`

	// This configuration is injected internally.
	QuerySchedulerDiscovery schedulerdiscovery.Config `yaml:"-"`
	MaxLoopDuration         time.Duration             `yaml:"-"`
}

Config for a Frontend.

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet, logger log.Logger)

func (*Config) Validate

func (cfg *Config) Validate(log log.Logger) error

type Frontend

type Frontend struct {
	services.Service

	frontendpb.UnimplementedFrontendForQuerierServer
	// 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, log log.Logger, reg prometheus.Registerer) (*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) QueryResult

func (f *Frontend) QueryResult(ctx context.Context, r *connect.Request[frontendpb.QueryResultRequest]) (*connect.Response[frontendpb.QueryResultResponse], error)

func (*Frontend) RoundTripGRPC

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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