Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
grpc-experimental-server
gRPC experimental server that supports koa-like interceptors
npm i ges grpc
import ExperimentalServer from 'ges';
const server = new ExperimentalServer();
server.addService(/* ... */);
// add interceptor
server.use(async (context, next) => {
// preprocess
const start = Date.now();
try {
await next();
} finally {
// postprocess
const costtime = Date.now() - start;
console.log('costtime is', costtime);
console.log('unary response is ', context.response);
}
});
serer.bind(/* ... */);
server.start();
gRPC
has 4 kinds of call:
handle type | request is stream or not | response is stream or not |
---|---|---|
handleUnaryCall | ❌ | ❌ |
handleClientStreamingCall | ✅ | ❌ |
handleServerStreamingCall | ❌ | ✅ |
handleBidiStreamingCall | ✅ | ✅ |
call
current gRPC calldefinition
the method definition of current callresponse
response if response is not stream
onFinished(...)
you can listen on call finish event, no matter response of current call is stream or not. So you don't need to care about what kind is the call. It is very useful to do something like tracing
, logging
await next()
would wait the call to be finished if response is not stream.FAQs
gRPC experimental server that support koa-like interceptor
The npm package ges receives a total of 5 weekly downloads. As such, ges popularity was classified as not popular.
We found that ges demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.