Refactored the scheduler and source interfaces to accommondate both polling (e.g., HTTP) sources and streaming (e.g., message queue) sources.
This commit is contained in:
@@ -83,9 +83,9 @@ func (c *Config) Validate() error {
|
||||
m.Add(fieldErr(path+".driver", "is required (e.g. openmeteo_observation, rss_feed, ...)"))
|
||||
}
|
||||
|
||||
// Every
|
||||
if s.Every.Duration <= 0 {
|
||||
m.Add(fieldErr(path+".every", "must be a positive duration (e.g. 15m, 1m, 30s)"))
|
||||
// Every (optional but if present must be >=0)
|
||||
if s.Every.Duration < 0 {
|
||||
m.Add(fieldErr(path+".every", "is optional, but must be a positive duration (e.g. 15m, 1m, 30s) if provided"))
|
||||
}
|
||||
|
||||
// Kind (optional but if present must be non-empty after trimming)
|
||||
|
||||
Reference in New Issue
Block a user