MCPcopy Create free account
hub / github.com/cortexproject/cortex / Validate

Method Validate

tools/query-audit/config.go:25–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23}
24
25func (q *Query) Validate() error {
26 parsedDur, err := time.ParseDuration(q.StepSizeStr)
27 if err != nil {
28 return err
29 }
30
31 q.StepSize = parsedDur
32
33 if q.StepSize == time.Duration(0) {
34 q.StepSize = time.Minute
35 }
36 return nil
37}
38
39type Config struct {
40 Control Backend `yaml:"control" json:"control"`

Callers 2

ValidateMethod · 0.45
LoadConfigFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected