(s *Service)
| 76 | } |
| 77 | |
| 78 | func 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 | |
| 89 | func CheckBackendMiddleware(s *Service) grpc.UnaryServerInterceptor { |
| 90 | return func( |
no test coverage detected