MCPcopy Create free account
hub / github.com/PasarGuard/node / checkBackendStatus

Function checkBackendStatus

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

Source from the content-addressed store, hash-verified

76}
77
78func checkBackendStatus(s *Service) error {
79 back := s.Backend()
80 if back == nil {
81 return status.Errorf(codes.Unavailable, "backend not initialized")
82 }
83 if !back.Started() {
84 return status.Errorf(codes.Unavailable, "core is not started yet")
85 }
86 return nil
87}
88
89func CheckBackendMiddleware(s *Service) grpc.UnaryServerInterceptor {
90 return func(

Callers 2

CheckBackendMiddlewareFunction · 0.85

Calls 2

BackendMethod · 0.80
StartedMethod · 0.65

Tested by

no test coverage detected