* feat: add endpoint.maintenance-windows array for per-endpoint maintenance configuration
* doc: initial entry for maintenance windows in endpoint config
* doc: example documentation for per-endpoint configuration of maintenance
windows
* chore: var => :=
* test: add checks for maintenance window defaults in endpoint configuration
* chore: clean up new-lines
---------
Co-authored-by: TwiN <twin@linux.com>
- Use `time.Ticker` instead of `time.After` for periodic operations in `autoSave` function
- Use `time.Ticker` instead of `time.After` for periodic operations in `monitor` function
Signed-off-by: appleboy <appleboy.tw@gmail.com>
* introduces TwiN/logr library
* use new features of logr library
* minor tweaks and formatting
* Apply suggestions from code review
---------
Co-authored-by: TwiN <twin@linux.com>
* refactor: Partially break core package into dns, result and ssh packages
* refactor: Move core package to config/endpoint
* refactor: Fix warning about overlapping imported package name with endpoint variable
* refactor: Rename EndpointStatus to Status
* refactor: Merge result pkg back into endpoint pkg, because it makes more sense
* refactor: Rename parameter r to result in Condition.evaluate
* refactor: Rename parameter r to result
* refactor: Revert accidental change to endpoint.TypeDNS
* refactor: Rename parameter r to result
* refactor: Merge util package into endpoint package
* refactor: Rename parameter r to result
* fix(watchdog): Add functions to avoid dangling file descriptors
* Change function name and add comment under core/endpoint.go
- change the function name of CloseHTTPConnection() to Close()
- add some comments above Close() function
* Update core/endpoint.go
* Update core/endpoint.go
---------
Co-authored-by: Richard Cheng <richard_cheng@trendmicro.com>
Co-authored-by: TwiN <twin@linux.com>
The results returned from the in-memory map are copies, so there's no concern over concurrent map access anymore, as the internal memory-map is hidden and inaccessible to callers