refactor web & activitylog checks

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2024-10-15 13:41:31 +02:00
parent 9186c90bd8
commit c11b18c833
2 changed files with 6 additions and 21 deletions
@@ -14,13 +14,15 @@ func Server(opts ...Option) (*http.Server, error) {
healthHandler := handlers.NewCheckHandler(
handlers.NewCheckHandlerConfiguration().
WithLogger(options.Logger),
WithLogger(options.Logger).
WithCheck("http reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)),
)
readyHandler := handlers.NewCheckHandler(
handlers.NewCheckHandlerConfiguration().
WithLogger(options.Logger).
WithCheck("nats reachability", handlers.NewNatsCheck(options.Config.Events.Cluster)),
WithCheck("nats reachability", handlers.NewNatsCheck(options.Config.Events.Cluster)).
WithInheritedChecksFrom(healthHandler.Conf),
)
return debug.NewService(