Function
ValidateCollectionInterval
(collectionInterval time.Duration)
Source from the content-addressed store, hash-verified
| 68 | } |
| 69 | |
| 70 | func ValidateCollectionInterval(collectionInterval time.Duration) error { |
| 71 | if collectionInterval < 15*time.Second || collectionInterval > 5*time.Minute { |
| 72 | return fmt.Errorf("metrics_generator.collection_interval \"%s\" is outside acceptable range of 15s to 5m", collectionInterval.String()) |
| 73 | } |
| 74 | return nil |
| 75 | } |
| 76 | |
| 77 | func ValidateIngestionTimeRangeSlack(ingestionTimeRangeSlack time.Duration) error { |
| 78 | if ingestionTimeRangeSlack < 0 || ingestionTimeRangeSlack > 12*time.Hour { |
Tested by
no test coverage detected