File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
src/implementation/Client/GRPCClient Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ limitations under the License.
1313
1414import GRPCClient from './GRPCClient' ;
1515import IClientHealth from '../../../interfaces/Client/IClientHealth' ;
16- import { GetMetadataResponse } from '../../../proto/dapr/proto/runtime/v1/dapr_pb' ;
17- import { Empty } from "google-protobuf/google/protobuf/empty_pb" ;
1816
1917// https://docs.dapr.io/reference/api/health_api/
2018export default class GRPCClientHealth implements IClientHealth {
@@ -26,20 +24,6 @@ export default class GRPCClientHealth implements IClientHealth {
2624
2725 // There is no gRPC implementation of /healthz, so we try to fetch the metadata
2826 async isHealthy ( ) : Promise < boolean > {
29- return new Promise ( ( resolve , _reject ) => {
30- const client = this . client . getClient ( ) ;
31-
32- try {
33- client . getMetadata ( new Empty ( ) , ( err , _res : GetMetadataResponse ) => {
34- if ( err ) {
35- return resolve ( false ) ;
36- }
37-
38- return resolve ( true ) ;
39- } ) ;
40- } catch ( e ) {
41- return resolve ( false ) ;
42- }
43- } ) ;
27+ return this . client . isSidecarStarted ( ) ;
4428 }
4529}
You can’t perform that action at this time.
0 commit comments