UNPKG

@mirasys/nestjs-jetstream-transporter

Version:
13 lines (12 loc) 564 B
import { CustomTransportStrategy, Server } from '@nestjs/microservices'; import { ConnectionOptions, ConsumerConfig, NatsConnection } from 'nats'; export declare class NatsStreamingTransporter extends Server implements CustomTransportStrategy { private readonly connectionOptions; private readonly consumerOptions; constructor(connectionOptions: ConnectionOptions, consumerOptions: ConsumerConfig); private stan?; getClient(): NatsConnection; listen(callback: () => void): Promise<void>; close(): void; private bindEventHandlers; }