/
githubmirror
/
nest
Обзор
Документация
Войти
/
githubmirror
/
nest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
packages/microservices/interfaces/client-metadata.interface.ts
52 строки
1 KB
Ricardo
feat(microservices): Add configurable maxBufferSize option
28 янв 2026, 21:21
28 янв 2026, 21:21
2c62817
Код
Авторство
О чём код?
import { Type } from '@nestjs/common'; import { ConnectionOptions } from 'tls'; import { ClientProxy } from '../client'; import { Transport } from '../enums/transport.enum'; import { TcpSocket } from '../helpers'; import { Deserializer } from './deserializer.interface'; import { GrpcOptions, KafkaOptions, MqttOptions, NatsOptions, RedisOptions, RmqOptions, } from './microservice-configuration.interface'; import { Serializer } from './serializer.interface'; export type ClientOptions = | RedisOptions | NatsOptions | MqttOptions | GrpcOptions | KafkaOptions | TcpClientOptions | RmqOptions; /** * @publicApi */ export interface CustomClientOptions { customClass: Type<ClientProxy>; options?: Record<string, any>; } /** * @publicApi */ export interface TcpClientOptions { transport: Transport.TCP; options?: { host?: string; port?: number; serializer?: Serializer; deserializer?: Deserializer; tlsOptions?: ConnectionOptions; socketClass?: Type<TcpSocket>; /** * Maximum buffer size in characters (default: 128MB in characters, i.e., (512 * 1024 * 1024) / 4). * This limit prevents memory exhaustion when receiving large TCP messages. */ maxBufferSize?: number; }; }