插件就绪事件示例

This commit is contained in:
cool 2024-04-26 11:01:17 +08:00
parent 02a708c6f7
commit fdd9a346a5

View File

@ -1,4 +1,5 @@
import { CoolEvent, Event } from '@cool-midway/core';
import { EVENT_PLUGIN_READY } from '../../plugin/service/center';
/**
*
@ -15,4 +16,12 @@ export class DemoCommEvent {
console.log(`comm当前进程的ID是: ${process.pid}`);
console.log('comm收到消息', msg, a);
}
/**
*
*/
@Event(EVENT_PLUGIN_READY)
async pluginReady(keyName: string) {
console.log('插件已就绪', keyName);
}
}