UNPKG

2.06 kBTypeScriptView Raw
1import { CanActivate, ExceptionFilter, INestMicroservice, NestInterceptor, PipeTransform, WebSocketAdapter } from '@nestjs/common';
2import { NestMicroserviceOptions } from '@nestjs/common/interfaces/microservices/nest-microservice-options.interface';
3import { Logger } from '@nestjs/common/services/logger.service';
4import { ApplicationConfig } from '@nestjs/core/application-config';
5import { NestContainer } from '@nestjs/core/injector/container';
6import { GraphInspector } from '@nestjs/core/inspector/graph-inspector';
7import { NestApplicationContext } from '@nestjs/core/nest-application-context';
8import { MicroserviceOptions } from './interfaces/microservice-configuration.interface';
9export declare class NestMicroservice extends NestApplicationContext<NestMicroserviceOptions> implements INestMicroservice {
10 private readonly graphInspector;
11 private readonly applicationConfig;
12 protected readonly logger: Logger;
13 private readonly microservicesModule;
14 private readonly socketModule;
15 private microserviceConfig;
16 private server;
17 private isTerminated;
18 private isInitHookCalled;
19 constructor(container: NestContainer, config: NestMicroserviceOptions & MicroserviceOptions, graphInspector: GraphInspector, applicationConfig: ApplicationConfig);
20 createServer(config: NestMicroserviceOptions & MicroserviceOptions): void;
21 registerModules(): Promise<any>;
22 registerListeners(): void;
23 useWebSocketAdapter(adapter: WebSocketAdapter): this;
24 useGlobalFilters(...filters: ExceptionFilter[]): this;
25 useGlobalPipes(...pipes: PipeTransform<any>[]): this;
26 useGlobalInterceptors(...interceptors: NestInterceptor[]): this;
27 useGlobalGuards(...guards: CanActivate[]): this;
28 init(): Promise<this>;
29 listen(): Promise<any>;
30 close(): Promise<any>;
31 setIsInitialized(isInitialized: boolean): void;
32 setIsTerminated(isTerminated: boolean): void;
33 setIsInitHookCalled(isInitHookCalled: boolean): void;
34 protected closeApplication(): Promise<any>;
35 protected dispose(): Promise<void>;
36}