v1

package
v0.0.0-...-bfa2730 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 19 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 {
	MaxOutstandingPerTenant int           `yaml:"max_outstanding_per_tenant"`
	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
	frontendv1pb.UnimplementedFrontendServer
	// 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) (*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) Process

Process allows backends to pull requests from the frontend.

func (*Frontend) ProcessTracepoint

func (f *Frontend) ProcessTracepoint(server frontendv1pb.Frontend_ProcessTracepointServer) error

func (*Frontend) QuerierRoundTrip

func (f *Frontend) QuerierRoundTrip(ctx context.Context, req *frontendv1pb.HTTPRequest) (*frontendv1pb.HTTPResponse, error)

QuerierRoundTrip sends a http request to the querier via a GRPC stream connection from the querier we 'store' the request in a queue (requestQueue) locally until a querier asks for a job

func (*Frontend) TracepointRoundTrip

func (f *Frontend) TracepointRoundTrip(ctx context.Context, req *frontendv1pb.HTTPRequest) (*frontendv1pb.HTTPResponse, error)

TracepointRoundTrip sends a http request to the tracepointAPI via a GRPC stream connection from the tracepointAPI we 'store' the request in a queue (tpRequestQueue) locally until a tracepointAPI asks for a job

type Limits

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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