1 | import { Transport } from '../enums';
|
2 | import { Client } from '../external/nats-client.interface';
|
3 | import { CustomTransportStrategy } from '../interfaces';
|
4 | import { NatsOptions } from '../interfaces/microservice-configuration.interface';
|
5 | import { Server } from './server';
|
6 | export declare class ServerNats extends Server implements CustomTransportStrategy {
|
7 | private readonly options;
|
8 | readonly transportId = Transport.NATS;
|
9 | private readonly url;
|
10 | private natsClient;
|
11 | constructor(options: NatsOptions['options']);
|
12 | listen(callback: () => void): void;
|
13 | start(callback?: () => void): void;
|
14 | bindEvents(client: Client): void;
|
15 | close(): void;
|
16 | createNatsClient(): Client;
|
17 | getMessageHandler(channel: string, client: Client): Function;
|
18 | handleMessage(channel: string, rawMessage: any, client: Client, replyTo: string, callerSubject: string): Promise<any>;
|
19 | getPublisher(publisher: Client, replyTo: string, id: string): (response: any) => void;
|
20 | handleError(stream: any): void;
|
21 | }
|