Documentation ¶
Index ¶
- type BidiStreamCloser
- type Config
- type Limits
- type Scheduler
- func (s *Scheduler) FrontendLoop(ctx context.Context, ...) error
- func (s *Scheduler) NotifyQuerierShutdown(ctx context.Context, ...) (*connect.Response[schedulerpb.NotifyQuerierShutdownResponse], error)
- func (s *Scheduler) QuerierLoop(ctx context.Context, ...) error
- func (s *Scheduler) RingHandler(w http.ResponseWriter, req *http.Request)
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"` }
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 ¶
type Scheduler struct { services.Service schedulerpb.UnimplementedSchedulerForFrontendServer schedulerpb.UnimplementedSchedulerForQuerierServer // contains filtered or unexported fields }
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 ¶
func (s *Scheduler) FrontendLoop(ctx context.Context, frontend *connect.BidiStream[schedulerpb.FrontendToScheduler, schedulerpb.SchedulerToFrontend]) error
FrontendLoop handles connection from frontend.
func (*Scheduler) NotifyQuerierShutdown ¶
func (s *Scheduler) NotifyQuerierShutdown(ctx context.Context, req *connect.Request[schedulerpb.NotifyQuerierShutdownRequest]) (*connect.Response[schedulerpb.NotifyQuerierShutdownResponse], error)
func (*Scheduler) QuerierLoop ¶
func (s *Scheduler) QuerierLoop(ctx context.Context, bidi *connect.BidiStream[schedulerpb.QuerierToScheduler, schedulerpb.SchedulerToQuerier]) error
QuerierLoop is started by querier to receive queries from scheduler.
func (*Scheduler) RingHandler ¶
func (s *Scheduler) RingHandler(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.