Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMaxSeriesHit = "the query hit the max number of series limit (limit: %d series)"
ErrMaxChunkBytesHit = "the query hit the aggregated chunks size limit (limit: %d bytes)"
ErrMaxChunksPerQueryLimit = "the query hit the max number of chunks limit (limit: %d chunks)"
)
Functions ¶
func AddQueryLimiterToContext ¶
func AddQueryLimiterToContext(ctx context.Context, limiter *QueryLimiter) context.Context
Types ¶
type CombinedLimits ¶
type CombinedLimits interface {
compactor.Limits
distributor.Limits
ingester.Limits
querier_limits.Limits
queryrange_limits.Limits
ruler.RulesLimits
scheduler_limits.Limits
storage.StoreLimits
indexgateway.Limits
bloomgateway.Limits
bloomplanner.Limits
bloombuilder.Limits
pattern.Limits
bucket.SSEConfigProvider
}
type QueryLimiter ¶
type QueryLimiter struct {
// contains filtered or unexported fields
}
func NewQueryLimiter ¶
func NewQueryLimiter(maxSeriesPerQuery, maxChunkBytesPerQuery int, maxChunksPerQuery int) *QueryLimiter
NewQueryLimiter makes a new per-query limiter. Each query limiter is configured using the `maxSeriesPerQuery` limit.
func QueryLimiterFromContextWithFallback ¶
func QueryLimiterFromContextWithFallback(ctx context.Context) *QueryLimiter
QueryLimiterFromContextWithFallback returns a QueryLimiter from the current context. If there is not a QueryLimiter on the context it will return a new no-op limiter.
func (*QueryLimiter) AddChunkBytes ¶
func (ql *QueryLimiter) AddChunkBytes(chunkSizeInBytes int) error
AddChunkBytes adds the input chunk size in bytes and returns an error if the limit is reached.
Click to show internal directories.
Click to hide internal directories.