Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
@fxs0819/grpc-client
Advanced tools
node版本基于服务端提供protos快速建立连接的客户端中间件.
Install with npm
npm install @fxs0819/grpc-client
:warning: 请确保您的系统/容器上已经安装了' openssl '
const config = {
uri: '0.0.0.0:50051',
ssl: {
isOpen: false
// rootCertPath: path.join(__dirname, './certs/cacert.pem'),
// clientStorePath: path.join(__dirname, './certs/client.pfx'),
// pfxCode: 'qianxin.quick.50843197',
// authority: 'quickservice'
},
config: {
PROTO_PATH: path.join(__dirname, './protos/Hello.proto'),
PACKAGE_NAME: 'hello',
SERVE_NAME: 'MainGreeter'
}
};
const client:Client = await new Client(config);
const res = await client.myProxy('sayHello', { 'name': 'Tom' });
console.log(res);
client.close();
import { PassThrough } from 'stream';
import * as lodash from 'lodash';
import * as async from 'async';
const stream = new PassThrough({ objectMode: true });
const sayMultiHelloCall = client.myProxy('sayMultiHello', stream);
const senders: any[] = [];
for (var i = 0; i < 10; i++) {
senders[i] = (function(i) {
return (callback:any)=>{
stream.write({ name: `name${i}` });
lodash.delay(callback, 1000);
};
}(i));
}
async.series(senders, () => {
stream.end();
});
const sayMultiHello = await sayMultiHelloCall;
MIT
FAQs
Customize Grpc Client
The npm package @fxs0819/grpc-client receives a total of 0 weekly downloads. As such, @fxs0819/grpc-client popularity was classified as not popular.
We found that @fxs0819/grpc-client 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.