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