import * as grpc from "@grpc/grpc-js"; import { DaprClient as GrpcDaprClient } from "../../../proto/dapr/proto/runtime/v1/dapr_grpc_pb"; import IClient from "../../../interfaces/Client/IClient"; import { DaprClientOptions } from "../../../types/DaprClientOptions"; export default class GRPCClient implements IClient { readonly options: DaprClientOptions; private isInitialized; private readonly client; private readonly clientCredentials; private readonly logger; private readonly grpcClientOptions; private daprEndpoint; constructor(options: Partial); getClient(requiresInitialization?: boolean): Promise; getClientCredentials(): grpc.ChannelCredentials; getGrpcClientOptions(): grpc.ClientOptions; private generateEndpoint; private generateCredentials; private generateChannelOptions; private generateInterceptors; setIsInitialized(isInitialized: boolean): void; getIsInitialized(): boolean; stop(): Promise; _startWaitForClientReady(): Promise; _startAwaitSidecarStarted(): Promise; /** * Ensure the client is started, this takes care of: * 1. Making sure the sidecar is started * 2. Making sure the connection is established (e.g. in gRPC) * 3. Making sure the client is ready to be used */ start(): Promise; }