File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import (
12
12
)
13
13
14
14
const (
15
- AppURL = "GF_APP_URL"
15
+ AppURL = "GF_APP_URL"
16
+ ConcurrentQueryCount = "GF_CONCURRENT_QUERY_COUNT"
16
17
)
17
18
18
19
type configKey struct {}
@@ -138,6 +139,18 @@ func (c *GrafanaCfg) AppURL() (string, error) {
138
139
return url , nil
139
140
}
140
141
142
+ func (c * GrafanaCfg ) ConcurrentQueryCount () (int , error ) {
143
+ count , ok := c .config [ConcurrentQueryCount ]
144
+ if ! ok {
145
+ return 0 , fmt .Errorf ("ConcurrentQueryCount not set in config" )
146
+ }
147
+ i , err := strconv .Atoi (count )
148
+ if err != nil {
149
+ return 0 , fmt .Errorf ("ConcurrentQueryCount cannot be converted to integer" )
150
+ }
151
+ return i , nil
152
+ }
153
+
141
154
type userAgentKey struct {}
142
155
143
156
// UserAgentFromContext returns user agent from context.
You can’t perform that action at this time.
0 commit comments