UNPKG

@voicenter-team/mysql-dynamic-cluster

Version:

Galera cluster with implementation of dynamic choose mysql server for queries, caching, hashing it and metrics

25 lines 736 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const events_1 = require("events"); const eventEmitter = new events_1.EventEmitter(); const Events = { /** * Connect to the event * @param event event name * @param callback function what will be called after emit */ on(event, callback) { eventEmitter.on(event, callback); }, /** * Emit the event. Call all functions what connected to the event * @param event event name * @param args arguments what will be passed to the callback function * @private */ emit(event, ...args) { eventEmitter.emit(event, args); } }; exports.default = Events; //# sourceMappingURL=Events.js.map