i8xscore
Version:
i8xiaoshi base socket communication,last update at 151021
53 lines (52 loc) • 1.48 kB
JavaScript
/**
* Created by kusion on 2015/6/16.
*/
/***
setCache: [Function],
hsetCache: [Function],
hGetAllCache: [Function],
hGetCache: [Function],
getCache: [Function],
clearCache: [Function],
* */
var i8core=require('./index');
i8core.setCache("key");
/***
* support feature:
getWorkflowServiceByThen: [Function],
getPlatformServiceByThen: [Function],
getCenterServiceByThen: [Function],
getAppsServiceByThen: [Function],
getStoreServiceByThen: [Function],
getSearchServiceByThen: [Function],
getWorkflowService: [Function],
getPlatformService: [Function],
getCenterService: [Function],
getAppsService: [Function] }
*/
var testreq= i8core.getPlatformService({
command: 'CPEC.Platform.Service.Platform.PersonInfoService.GetPersonInfo',
data: {accountID:"cd2977ad-7aee-4db1-9d32-1516a9addf89",passportID:"c5f22cfc-cf70-49ec-9955-106562d03904"},
nodeKey:"default",
success:function(data){
console.log(data);
}
});
testreq.init();
/***
* log feature:
* trace
* log
* trace
* debug
* warn
* error
*/
var logger=require('i8xscore').logger;
logger.trace('hello output', 'world tracer');;
logger.log('hello');
logger.trace('hello', 'world');
logger.debug('hello %s', 'world', 123);
logger.info('hello %s %d', 'world', 123, {foo : 'bar'});
logger.warn('hello %s %d %j', 'world', 123, {foo : 'bar'});
logger.error('hello %s %d %j', 'world', 123, {foo : 'bar'}, [ 1, 2, 3, 4 ], Object);