caas-team / sparrow

A monitoring tool to gather infrastructure network information
Apache License 2.0
6 stars 4 forks source link

Bug: Panic if loader interval is not set #107

Closed lvlcn-t closed 4 months ago

lvlcn-t commented 4 months ago

Is there an existing feature request for this?

Problem Description

Currently the loaders would panic if no interval is set because it then calls time.NewTicker(0) which panics.

Solution Description

We should at least validate if the interval is > 0.

But imo this offers the opportunity to introduce another feature to the loaders.

We could disable the continuous loading of the check config with an interval of 0. This would also align with the feature introduced by #101 which kinda does this for the instance registration and update.

If we introduced this proposal, we'd only need to check our startup config for interval < 0.

Who can address the issue?

Everyone

Additional Context

No response