1 |
|
2 | import { Type } from '@nestjs/common';
|
3 | import { ClientProxy } from '../client';
|
4 | import { TcpSocket } from '../helpers';
|
5 | import { Transport } from '../enums/transport.enum';
|
6 | import { Deserializer } from './deserializer.interface';
|
7 | import { GrpcOptions, KafkaOptions, MqttOptions, NatsOptions, RedisOptions, RmqOptions } from './microservice-configuration.interface';
|
8 | import { Serializer } from './serializer.interface';
|
9 | import { ConnectionOptions } from 'tls';
|
10 | export type ClientOptions = RedisOptions | NatsOptions | MqttOptions | GrpcOptions | KafkaOptions | TcpClientOptions | RmqOptions;
|
11 |
|
12 |
|
13 |
|
14 | export interface CustomClientOptions {
|
15 | customClass: Type<ClientProxy>;
|
16 | options?: Record<string, any>;
|
17 | }
|
18 |
|
19 |
|
20 |
|
21 | export interface TcpClientOptions {
|
22 | transport: Transport.TCP;
|
23 | options?: {
|
24 | host?: string;
|
25 | port?: number;
|
26 | serializer?: Serializer;
|
27 | deserializer?: Deserializer;
|
28 | tlsOptions?: ConnectionOptions;
|
29 | socketClass?: Type<TcpSocket>;
|
30 | };
|
31 | }
|