@nestjs/microservices
Version:
Microservices for NestJS: message and event handlers over Kafka, RabbitMQ, NATS, Redis, MQTT, gRPC or TCP.
23 lines (22 loc) • 430 B
JavaScript
/**
* @publicApi
*/
export class BaseRpcContext {
args;
constructor(args) {
this.args = args;
}
/**
* Returns the array of arguments being passed to the handler.
*/
getArgs() {
return this.args;
}
/**
* Returns a particular argument by index.
* @param index index of argument to retrieve
*/
getArgByIndex(index) {
return this.args[index];
}
}