GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - adonis2014/node-eos: eos client for node.js

BranchesTags
Open more actions menu

Latest commit

 

History

25 Commits
25 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
lib
lib
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
README.md
README.md
 
 
index.js
index.js
 
 
package.json
package.json
 
 

Repository files navigation

node-eos

eos(https://github.com/ulyn/eos) client for node.js

This module has been tested to work with eos version 2.1.0.

Installation

You can install it using npm:

$ npm install node-eos

How to use

  1. init eos :
	var eos = require("node-eos");
	eos.init({
    	zookeeper_ip: '192.168.0.224',
    	zookeeper_port: 2181,
    	long_connect: true,
    	exclude_eos:[],//ignore eos
    	debugging_server_ip: '', //debugging server ip
    	use_mock: true, //controll global mock 
    	mock_config_file: __dirname + "/config_mock.json" //mock config file path
	});
  1. definde a eos service
	
	module.exports = function(eos){
	    function testType(){
	        eos.Service.call(this);
	        this.appId = "test";
	        this.serviceId = "testType";
	        this.serviceVersion = "1.3";
	    }
	    eos.util.inherits(testType,eos.Service);
	
	    testType.prototype.testMap = function(map,str,successFunc,errorFunc){
	        var req = this._createReqPro("testMap",map,str);
	        eos.call(req,successFunc,errorFunc);
	    }
	    return testType;
	}
  1. call service
	
	var test =  require("./testType")(eos);

    new test.appService().testMap({"a":"1","b":"2"},"abc",function(data){
        console.log("get result:"+JSON.stringify(data));
    },function(e){
        console.log("exception:"+e);
    });

document

Filter

mock config file


	{
    "mock":"",
    "appService":{
        "mock":"serviceMock",
        "method":{
            "getSystemConfig":"success",
            "testList":"error"
        }
    },
    "service2":{
        "mock":"success",
        "method":{
            "testMap":"success",
            "testList":"error"
        }
    }
}


Exception

the errorFunc params

  • getMessage
  • getCode
  • getName

notes

  • please ensure that the eos is loaded only once

About

eos client for node.js

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.