@addapptables/microservice
Version:
addapptables microservice
25 lines • 566 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Broker = void 0;
class Broker {
constructor() {
this.sagas = new Map();
}
static getInstance() {
if (!Broker.instance) {
Broker.instance = new Broker();
}
return Broker.instance;
}
get(cid) {
return this.sagas.get(cid);
}
add(cid, handle) {
this.sagas.set(cid, handle);
}
delete(cid) {
this.sagas.delete(cid);
}
}
exports.Broker = Broker;
//# sourceMappingURL=broker.js.map