mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-25 21:48:28 -05:00
the server probs added to the several services
This commit is contained in:
@@ -18,6 +18,13 @@ func Server(opts ...Option) (*http.Server, error) {
|
||||
WithCheck("web reachability", handlers.NewHTTPCheck(options.Config.HTTP.Addr)),
|
||||
)
|
||||
|
||||
readyHandler := handlers.NewCheckHandler(
|
||||
handlers.NewCheckHandlerConfiguration().
|
||||
WithLogger(options.Logger).
|
||||
WithCheck("nats reachability", handlers.NewNatsCheck(options.Config.Events.Cluster)).
|
||||
WithInheritedChecksFrom(checkHandler.Conf),
|
||||
)
|
||||
|
||||
return debug.NewService(
|
||||
debug.Logger(options.Logger),
|
||||
debug.Name(options.Config.Service.Name),
|
||||
@@ -27,6 +34,6 @@ func Server(opts ...Option) (*http.Server, error) {
|
||||
debug.Pprof(options.Config.Debug.Pprof),
|
||||
debug.Zpages(options.Config.Debug.Zpages),
|
||||
debug.Health(checkHandler),
|
||||
debug.Ready(checkHandler),
|
||||
debug.Ready(readyHandler),
|
||||
), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user