Interface describing the public API of the gRPC Client class, used to provide better version-to-version type compatibility between gRPC releases. Application code should use a concrete gRPC Client instance.

interface GrpcClient {
    close(): void;
    getChannel(): Channel;
    makeBidiStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), metadata: Metadata, options?: CallOptions): ClientDuplexStream<RequestType, ResponseType>;
    makeBidiStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), options?: CallOptions): ClientDuplexStream<RequestType, ResponseType>;
    makeClientStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), metadata: Metadata, options: CallOptions, callback: UnaryCallback<ResponseType>): ClientWritableStream<RequestType>;
    makeClientStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), metadata: Metadata | CallOptions, callback: UnaryCallback<ResponseType>): ClientWritableStream<RequestType>;
    makeClientStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), callback: UnaryCallback<ResponseType>): ClientWritableStream<RequestType>;
    makeServerStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), argument: RequestType, metadata: Metadata, options?: CallOptions): ClientReadableStream<ResponseType>;
    makeServerStreamRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), argument: RequestType, options?: CallOptions): ClientReadableStream<ResponseType>;
    makeUnaryRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), argument: RequestType, metadata: Metadata, options: CallOptions, callback: UnaryCallback<ResponseType>): SurfaceCall;
    makeUnaryRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), argument: RequestType, metadata: Metadata | CallOptions, callback: UnaryCallback<ResponseType>): SurfaceCall;
    makeUnaryRequest<RequestType, ResponseType>(method: string, serialize: ((value: RequestType) => Buffer), deserialize: ((value: Buffer) => ResponseType), argument: RequestType, callback: UnaryCallback<ResponseType>): SurfaceCall;
    waitForReady(deadline: Deadline, callback: ((error?: Error) => void)): void;
}

Methods

  • Parameters

    • deadline: Deadline
    • callback: ((error?: Error) => void)
        • (error?): void
        • Parameters

          • Optionalerror: Error

          Returns void

    Returns void