Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watchServer模块 handler命令无法展示 具体的handler方法名称。 #78

Open
whtiehack opened this issue Jun 21, 2019 · 0 comments
Labels

Comments

@whtiehack
Copy link
Member

function handlerCb(app: Application, context: string, cb: MasterCallback) {
let msg: any = {};
let __server__ = app.components.__server__;
if (__server__ && __server__.server && __server__.server.handlerService.handlerMap) {
let handles = __server__.server.handlerService.handlerMap;
let server = app.getServerById(context);
if (!server) {
cb('no server with this id ' + context);
} else {
let type = server['serverType'];
let tmp = handles as any;
msg[type] = {};
for (let _p in tmp) {
let r = tmp[_p];
msg[type][_p] = {};
for (let _r in r) {
if (typeof r[_r] === 'function') {
msg[type][_p][_r] = 'function';
}
}
}
cb(null, msg);
}
} else {
cb('no handler loaded');
}
}

初步分析是 无法直接遍历出es6类的方法。

whtiehack added a commit that referenced this issue Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant