mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-08 11:53:07 -04:00
enhancement: simplify ready and health check handler usage
This commit is contained in:
1 parent
0ea4312668
commit
66ff86bd35
27 files changed
+209
-84
No files matched your search
@@ -3,6 +3,7 @@ package debug
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/checks"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/handlers"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/service/debug"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/version"
|
||||
@@ -15,7 +16,7 @@ func Server(opts ...Option) (*http.Server, error) {
|
||||
checkHandler := handlers.NewCheckHandler(
|
||||
handlers.NewCheckHandlerConfiguration().
|
||||
WithLogger(options.Logger).
|
||||
WithCheck("web reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)),
|
||||
WithCheck("web reachability", checks.NewHTTPCheck(options.Config.HTTP.Addr)),
|
||||
)
|
||||
|
||||
return debug.NewService(
|
||||
|
||||
Reference in new issue
Block a user