github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/pkg/querier/queryrange/queryrangebase/limits.go (about) 1 package queryrangebase 2 3 import ( 4 "time" 5 ) 6 7 // Limits allows us to specify per-tenant runtime limits on the behavior of 8 // the query handling code. 9 type Limits interface { 10 // MaxQueryLookback returns the max lookback period of queries. 11 MaxQueryLookback(userID string) time.Duration 12 13 // MaxQueryLength returns the limit of the length (in time) of a query. 14 MaxQueryLength(string) time.Duration 15 16 // MaxQueryParallelism returns the limit to the number of split queries the 17 // frontend will process in parallel. 18 MaxQueryParallelism(string) int 19 20 // MaxCacheFreshness returns the period after which results are cacheable, 21 // to prevent caching of very recent results. 22 MaxCacheFreshness(string) time.Duration 23 }