- This library auto-apply promise into Unary calls
- This library implements a consistent Connection Pool with a Round-Robin strategy auto manageable for its instance or new instances;
- It's supports gRPC and gRPC-js implementations;
How to Install
npm i @codibre/grpc-base-client
How to Use
import { Client as gRPCCLient } from '@codibre/grpc-base-client';
interface Health {
Check(props: { service: string }): Promise<any>;
}
const grpcCLient = new gRPCCLient<Health>({
namespace: 'abc.def',
protoFile: 'health-check.proto',
url: 'test.service',
maxConnections: 2,
service: 'Health',
secure: true,
});
await grpcCLient.getInstance().Check({service: 'foo'});
License
Licensed under MIT.