MCPcopy Index your code
hub / github.com/PasarGuard/node / CheckBackendMiddleware

Function CheckBackendMiddleware

controller/rpc/middleware.go:89–102  ·  view source on GitHub ↗
(s *Service)

Source from the content-addressed store, hash-verified

87}
88
89func CheckBackendMiddleware(s *Service) grpc.UnaryServerInterceptor {
90 return func(
91 ctx context.Context,
92 req interface{},
93 info *grpc.UnaryServerInfo,
94 handler grpc.UnaryHandler,
95 ) (interface{}, error) {
96 if err := checkBackendStatus(s); err != nil {
97 return nil, err
98 }
99
100 return handler(ctx, req)
101 }
102}
103
104func CheckBackendStreamMiddleware(s *Service) grpc.StreamServerInterceptor {
105 return func(

Callers 1

ConditionalMiddlewareFunction · 0.85

Calls 1

checkBackendStatusFunction · 0.85

Tested by

no test coverage detected