@nestjs/microservices
Version:
Nest - modern, fast, powerful node.js web framework (@microservices)
20 lines (19 loc) • 508 B
TypeScript
import { Transport } from '../enums';
/**
* @publicApi
*/
export interface CustomTransportStrategy {
/**
* Unique transport identifier.
*/
readonly transportId?: Transport | symbol;
/**
* Method called when the transport is being initialized.
* @param callback Function to be called upon initialization
*/
listen(callback: (...optionalParams: unknown[]) => any): any;
/**
* Method called when the transport is being terminated.
*/
close(): any;
}