New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

egg-grpc-client-ts

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-grpc-client-ts

TypeScript version of egg grpc client plugin.

latest
Source
npmnpm
Version
3.0.2
Version published
Maintainers
1
Created
Source

egg-grpc-client-ts

TypeScript version of egg grpc client plugin.

Inspired by egg-grpc-client.

NPM version Build Status codecov David deps Known Vulnerabilities npm download

Install

$ npm i egg-grpc-client-ts --save

Usage

// {app_root}/config/plugin.[t|j]s
exports.grpcClient = {
  enable: true,
  package: 'egg-grpc-client-ts',
};

Configuration

// {app_root}/config/config.default.[t|j]s
exports.grpcClient = {
  clients: [
    {
      name: 'main',
      protoPath: 'app/proto/main',
      host: '0.0.0.0',
      port: 50051,
    },
  ],
};

see config/config.default.ts for more detail.

Example

Questions & Suggestions

Please open an issue here.

License

MIT

Test

# start test grpc server
npm run test-server

# In another shell, run:
npm run test-local

Release Notes:

  • 1.1.5: 报错时,把相关 server address, service, method, 参数 等元信息带上。

  • 1.1.6: fail fast。默认超时时间为 10 秒(原来默认 1 分钟,太长了)

  • 2.0.1: 允许传入 grpcMeta,实现分布式链路跟踪

  • 2.1.0: grpc 健康检查

Keywords

egg

FAQs

Package last updated on 10 Mar 2020

Did you know?

Socket

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