GithubHelp home page GithubHelp logo

gamehiboy / node-zookeeper-dubbo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from omnip620/node-zookeeper-dubbo

0.0 1.0 0.0 55 KB

nodejs connect dubbo by default protocol in zookeeper

JavaScript 100.00%

node-zookeeper-dubbo's Introduction

node-zookeeper-dubbo

nodejs connect dubbo by default protocol in zookeeper

NPM version Downloads

config

env

dubbo service version

conn

zookeeper conn url

path

the service you need

version

dubbo version

Example

var Service=require('node-zookeeper-dubbo');

var opt={
  env:'test', // dubbo service version
  gruop:'dubbo', // dubbo group default by 'dubbo',optional
  conn:'127.0.0.1:2180', // zookeeper url
  path:'com.customer.Service', // service url
  version:'2.3.4.5' // dubbo version
}

var method="getUserByID";
var arg1={$class:'int',$:123}
var args=[arg1];

var service = new Service(opt);
service.excute(method,args,function(err,data){
  if(err){
    console.log(err);
    return;
  }
  console.log(data)
})

or

service
  .excute(method,args)
  .then(function(data){
    console.log(data);
  })
  .catch(function(err) {
    console.log(err);
  })

you can use js-to-java

var arg1={$class:'int',$:123};
//equivalent
var arg1=java('int',123);

Close zookeeper connection

Default the zookeeper connection is keep-alive,you can call service.zoo.close() to close the connect;

Recruitment (ง •̀_•́)ง

want to join us? if u have any interests,contact me or send your CV to [email protected]

Contributors

PanEW

zhanghua

caomu

zhchj126

node-zookeeper-dubbo's People

Contributors

omnip620 avatar caomu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.