scheduler

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: AGPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BidiStreamCloser

type BidiStreamCloser[Req, Res any] struct {
	// contains filtered or unexported fields
}

BidiStreamCloser is a wrapper around BidiStream that allows to close it. Once closed, it will return io.EOF on Receive and Send.

func (*BidiStreamCloser[Req, Res]) Close

func (c *BidiStreamCloser[Req, Res]) Close()

func (*BidiStreamCloser[Req, Res]) Receive

func (c *BidiStreamCloser[Req, Res]) Receive() (*Req, error)

func (*BidiStreamCloser[Req, Res]) Send

func (b *BidiStreamCloser[Req, Res]) Send(msg *Res) error

type Config

type Config struct {
	MaxOutstandingPerTenant int                       `yaml:"max_outstanding_requests_per_tenant"`
	QuerierForgetDelay      time.Duration             `yaml:"querier_forget_delay" category:"experimental"`
	GRPCClientConfig        grpcclient.Config         `yaml:"grpc_client_config" doc:"description=This configures the gRPC client used to report errors back to the query-frontend."`
	ServiceDiscovery        schedulerdiscovery.Config `yaml:",inline"`
}

func (*Config) RegisterFlags

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

func (*Config) Validate

func (cfg *Config) Validate() error

type Limits

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

Limits needed for the Query Scheduler - interface used for decoupling.

type Scheduler

Scheduler is responsible for queueing and dispatching queries to Queriers.

func NewScheduler

func NewScheduler(cfg Config, limits Limits, log log.Logger, registerer prometheus.Registerer) (*Scheduler, error)

NewScheduler creates a new Scheduler.

func (*Scheduler) FrontendLoop

FrontendLoop handles connection from frontend.

func (*Scheduler) QuerierLoop

QuerierLoop is started by querier to receive queries from scheduler.

func (*Scheduler) RingHandler

func (s *Scheduler) RingHandler(w http.ResponseWriter, req *http.Request)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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