Skip to content

Commit

Permalink
add grpc checker to search, settings & thumbnails
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Richter <crichter@owncloud.com>
  • Loading branch information
dragonchaser committed Oct 15, 2024
1 parent c803194 commit 49cf9b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions ocis-pkg/handlers/checkgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package handlers
import (
"context"
"fmt"

"google.golang.org/grpc/credentials/insecure"

"google.golang.org/grpc"
Expand Down
3 changes: 2 additions & 1 deletion services/search/pkg/server/debug/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ func Server(opts ...Option) (*http.Server, error) {

checkHandler := handlers.NewCheckHandler(
handlers.NewCheckHandlerConfiguration().
WithLogger(options.Logger),
WithLogger(options.Logger).
WithCheck("grpc reachability", handlers.NewGRPCCheck(options.Config.GRPC.Addr)),
)

return debug.NewService(
Expand Down
3 changes: 2 additions & 1 deletion services/settings/pkg/server/debug/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ 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", handlers.NewHTTPCheck(options.Config.HTTP.Addr)).
WithCheck("grpc reachability", handlers.NewGRPCCheck(options.Config.GRPC.Addr)),
)

return debug.NewService(
Expand Down
3 changes: 2 additions & 1 deletion services/thumbnails/pkg/server/debug/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ 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", handlers.NewHTTPCheck(options.Config.HTTP.Addr)).
WithCheck("grpc reachability", handlers.NewGRPCCheck(options.Config.GRPC.Addr)),
)

return debug.NewService(
Expand Down

0 comments on commit 49cf9b0

Please sign in to comment.