caas-team / sparrow

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

Cleanup API with dynamic Handler #92

Closed y-eight closed 7 months ago

y-eight commented 8 months ago

Motivation

With #91 we have removed the handler functions from the checks interface. Currently the http handler are not used by the checks. The http & latency checks are able to use endpoints that are returning 200 HTTP OK. For checking other sparrow instances the global health sparrow endpoint can be used/is used.

Refactor/Cleanup

The api is still configured to allow HTTP handles to be registered manually. To cleanup the code base the functionality needs to be removed including all related func.

The following sections need to be checked and cleaned up:

https://github.com/caas-team/sparrow/blob/main/pkg%2Fsparrow%2Fapi.go#L56

https://github.com/caas-team/sparrow/blob/main/pkg%2Fsparrow%2Fapi.go#L258

https://github.com/caas-team/sparrow/tree/main/pkg%2Fapi

lvlcn-t commented 8 months ago

I've cleaned up and refactored our current API implementation in refactor/api.

I'll open a PR after #93 is merged.