Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@brigade/pooled-thrift-client
Advanced tools
Changelog
2.0.0
Readme
A node Thrift client utilising a pool of service connections and improved error handling/recovery
Given a thrift file calculator_service.thrift
with contents:
exception OutOfRange {
1: string message
}
service CalculatorService {
i32 add(1:i32 num1, 2:i32 num2) throws (1:OutOfRange out_of_range)
}
Compile with the thrift
command (installable via your package manager):
thrift --gen js:node calculator_service.thrift
This will produce JS definitions for your service, which can then be used to create a client:
const CalculatorService = require('./CalculatorService');
const thriftClient = require('pooled-thrift-client');
// host and port are mandatory see other config options in comments
const host = '127.0.0.1', port = 9000;
const client = thriftClient(CalculatorService, { host, port }, { poolOptions: { max: 5 } });
// use the client as you would a regular client, get pooling for free
client.add(1, 2).then(sum => console.log(sum));
Tests use the calculator_service.thrift
example service located in
spec/support/thrift
. A compiled version is committed to this repository; to
recompile it, install thrift
using your package manager (e.g., brew install thrift
), then follow the instructions in the file.
Tests can be run using
npm test
FAQs
A Thrift client utilising a pool of service connections and improved error handling/recovery
The npm package @brigade/pooled-thrift-client receives a total of 7 weekly downloads. As such, @brigade/pooled-thrift-client popularity was classified as not popular.
We found that @brigade/pooled-thrift-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.