@micro.ts/core
Version:
Microservice framework with Typescript
29 lines (28 loc) • 689 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BrokerBuilder = void 0;
class BrokerBuilder {
constructor(cfg) {
this.cfg = cfg;
}
withConfigResolver(configResolver) {
this.broker.setConfigResolver(this.cfg, configResolver);
return this;
}
withConfig(config) {
this.broker.setAbsoluteConfig(config);
return this;
}
named(name) {
this.broker.name = name;
return this;
}
withTimeout(timeout) {
this.broker.setDefaultTimeout(timeout);
return this;
}
getBroker() {
return this.broker;
}
}
exports.BrokerBuilder = BrokerBuilder;