
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
dubbo-client
Advanced tools
npm install dubbo-client
https://github.com/QianmiOpen/dubbo-client
public interface CarProvider {
boolean add(Car car);
boolean edit(Car car);
List<Car> list();
}
//
var dbc = require('dubbo-client');
//加载配置文件
dbc.config(require('./example/config.js'));
//获取serivce
var version = '1.0.0';
var group = '';
var carService = dbc.getService('me.eeve.service.car.CarProvider', version, group);
//调用方式一, 这种可以立即调用, 无需延迟
carService.call('add', {
name: '奔驰',
color: '红色'
})
.then(function(result){ //成功
return this.call('list');
})
.catch(function(error){ //失败
})
.finally(function(){ //不管成功还是失败
});
//调用方式二, 这种需要延迟, 因为provider的方法是由zookeeper的节点提供,
//所以要先查到这个provider的节点, 这个步骤是异步的, 就导致你如果直接调用方法会报错
carService.list();
//当然如果你是在Express里面调用, 那肯定没有问题.
function doFoo(req, res){
carService.list()
.then(function(out){
res.send(out);
});
}
FAQs
the node module of dubbo client
The npm package dubbo-client receives a total of 7 weekly downloads. As such, dubbo-client popularity was classified as not popular.
We found that dubbo-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
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.