egg-kafka-cluster
Version:
provides egg bindings for the kafka.
18 lines (12 loc) • 305 B
text/typescript
import { Application, IBoot } from 'egg';
import { Kafka } from 'lib/kafka';
export default class FooBoot implements IBoot {
app: Application;
constructor(app: Application) {
this.app = app;
this.app.kafka = new Kafka(app);
}
async didLoad() {
this.app.kafka.appDelegate();
}
}