v1

package
v1.18.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2024 License: Apache-2.0 Imports: 23 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	QuerierForgetDelay time.Duration `yaml:"querier_forget_delay"`
}

Config for a Frontend.

func (*Config) RegisterFlags

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

RegisterFlags adds the flags required to config this to the given FlagSet.

type Frontend

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

Frontend queues HTTP requests, dispatches them to backends, and handles retries for requests which failed.

func New

func New(cfg Config, limits Limits, log log.Logger, registerer prometheus.Registerer, retry *transport.Retry) (*Frontend, error)

New creates a new frontend. Frontend implements service, and must be started and stopped.

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) NotifyClientShutdown added in v1.9.0

func (*Frontend) Process

Process allows backends to pull requests from the frontend.

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).

type Limits

type Limits interface {
	// Returns max queriers to use per tenant, or 0 if shuffle sharding is disabled.
	MaxQueriersPerUser(user string) float64

	queue.Limits
}

type MockLimits added in v1.15.0

type MockLimits struct {
	Queriers float64

	queue.MockLimits
	// contains filtered or unexported fields
}

MockLimits implements the Limits interface. Used in tests only.

func (MockLimits) MaxQueriersPerUser added in v1.15.0

func (l MockLimits) MaxQueriersPerUser(_ string) float64

func (MockLimits) QueryPriority added in v1.17.0

func (l MockLimits) QueryPriority(_ string) validation.QueryPriority

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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