Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add MaxLookBack and MaxLength Query Limits (grafana/phlare#741)
* Setup better default * Add MaxLookBack and Length Query Limits * Fixes double config flag registration * make reference-help
- Loading branch information
1 parent
3fbfb8b
commit 5e04c41
Showing
12 changed files
with
233 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package validation | ||
|
||
import "time" | ||
|
||
type MockLimits struct { | ||
QuerySplitDurationValue time.Duration | ||
MaxQueryParallelismValue int | ||
MaxQueryLengthValue time.Duration | ||
MaxQueryLookbackValue time.Duration | ||
MaxLabelNameLengthValue int | ||
MaxLabelValueLengthValue int | ||
MaxLabelNamesPerSeriesValue int | ||
} | ||
|
||
func (m MockLimits) QuerySplitDuration(string) time.Duration { return m.QuerySplitDurationValue } | ||
func (m MockLimits) MaxQueryParallelism(string) int { return m.MaxQueryParallelismValue } | ||
func (m MockLimits) MaxQueryLength(tenantID string) time.Duration { return m.MaxQueryLengthValue } | ||
func (m MockLimits) MaxQueryLookback(tenantID string) time.Duration { return m.MaxQueryLookbackValue } | ||
func (m MockLimits) MaxLabelNameLength(userID string) int { return m.MaxLabelNameLengthValue } | ||
func (m MockLimits) MaxLabelValueLength(userID string) int { return m.MaxLabelValueLengthValue } | ||
func (m MockLimits) MaxLabelNamesPerSeries(userID string) int { return m.MaxLabelNamesPerSeriesValue } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.