@nestjs/microservices
Version:
Microservices for NestJS: message and event handlers over Kafka, RabbitMQ, NATS, Redis, MQTT, gRPC or TCP.
27 lines (26 loc) • 528 B
JavaScript
/**
* @publicApi
*/
export class RequestContextHost {
pattern;
data;
context;
constructor(pattern, data, context) {
this.pattern = pattern;
this.data = data;
this.context = context;
}
static create(pattern, data, context) {
const host = new RequestContextHost(pattern, data, context);
return host;
}
getData() {
return this.data;
}
getPattern() {
return this.pattern;
}
getContext() {
return this.context;
}
}