Add quota setting for correlations (#65076)

* Add quota setting for correlations

* Fix linter
This commit is contained in:
Kristina
2023-03-21 15:27:25 -05:00
committed by GitHub
parent bf54f2672e
commit 702ec59cc4
7 changed files with 117 additions and 19 deletions

View File

@@ -4,6 +4,8 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/grafana/grafana/pkg/services/quota"
)
var (
@@ -17,6 +19,13 @@ var (
ErrInvalidTransformationType = errors.New("invalid transformation type")
ErrTransformationNotNested = errors.New("transformations must be nested under config")
ErrTransformationRegexReqExp = errors.New("regex transformations require expression")
ErrCorrelationsQuotaFailed = errors.New("error getting correlations quota")
ErrCorrelationsQuotaReached = errors.New("correlations quota reached")
)
const (
QuotaTargetSrv quota.TargetSrv = "correlations"
QuotaTarget quota.Target = "correlations"
)
type CorrelationConfigType string