Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Limits ¶
type Limits interface { // MaxQueriersPerUser returns max queriers to use per tenant, or 0 if shuffle sharding is disabled. MaxQueriersPerUser(user string) uint // MaxQueryCapacity returns how much of the available query capacity can be used by this user. MaxQueryCapacity(user string) float64 }
Limits needed for the Query Scheduler - interface used for decoupling.
type QueueLimits ¶
type QueueLimits struct {
// contains filtered or unexported fields
}
func NewQueueLimits ¶
func NewQueueLimits(limits Limits) *QueueLimits
func (*QueueLimits) MaxConsumers ¶
func (c *QueueLimits) MaxConsumers(tenantID string, allConsumers int) int
MaxConsumers is used to compute how many of the available queriers are allowed to handle requests for a given tenant. Returns the min value or one of (frontend.max-queriers-per-tenant, ceil(querier_replicas * frontend.max-query-capacity)) depending of whether both or only one of the two limits are configured. 0 is returned when neither limits are applied.
Click to show internal directories.
Click to hide internal directories.