Like Prometheus, but for logs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
loki/pkg/logql/limits.go

29 lines
500 B

package logql
import (
"math"
"time"
)
var (
NoLimits = &fakeLimits{maxSeries: math.MaxInt32}
)
// Limits allow the engine to fetch limits for a given users.
type Limits interface {
MaxQuerySeries(userID string) int
QueryTimeout(userID string) time.Duration
}
type fakeLimits struct {
maxSeries int
timeout time.Duration
}
func (f fakeLimits) MaxQuerySeries(userID string) int {
return f.maxSeries
}
func (f fakeLimits) QueryTimeout(userID string) time.Duration {
return f.timeout
}