Socket
Socket
Sign inDemoInstall

grpc-base-client

Package Overview
Dependencies
148
Maintainers
8
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    grpc-base-client

This project is a Library base for construct gRPC clients


Version published
Weekly downloads
47
decreased by-65.44%
Maintainers
8
Created
Weekly downloads
 

Changelog

Source

2.0.0 (2023-01-07)

Features

  • adding legacy grpc lib support (#9) (45a7f3d)

BREAKING CHANGES

  • The library contract needed to be changed in order to keep functionalities compatible between both versions. Although the contract must be almost equal some things like error catching have behaved differently between them. Due to that, we chose an approach that works for both packages, but we need to break the contract.

Readme

Source

Actions Status

Actions Status

Actions Status

Test Coverage

Maintainability

Packages

npm version

  • 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'}); // { status: 'SERVING' }

License

Licensed under MIT.

FAQs

Last updated on 07 Jan 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc