Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-web-utils

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-web-utils

grpc-web utils

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-73.68%
Maintainers
1
Weekly downloads
 
Created
Source

grpc-web-utils

grpc-web utils for nodejs

check release

Cancellation example usage:

  • deadline (see tests/signalInterceptor.test.ts)
const deadline = new Date();
deadline.setMilliseconds(deadline.getMilliseconds() + 1000); // timeout 1000 ms
md["deadline"] = deadline.getTime().toString();
  • cancellation (streaming)
const options = {
  streamInterceptors: [new SignalStreamInterceptor()],
};
const client = new EchoServiceClient("", null, options);
const req = new ServerStreamingEchoRequest();
const controller = new AbortController(); // controller usually created by frameworks e.g. redux-toolkit
const stream = client.serverStreamingEcho(req, { signal: controller.signal, } as MetadataWithSignal);
controller.abort();

N.B.

  • StreamInterceptor works with RPC client
  • createPromiseClient doesn't work for cancellation, see tests/promiseClient.test.ts skipped test

FAQs

Package last updated on 25 Mar 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc