Skip to content

TerminusModule

@tsed/terminus

Usage

typescript
import { TerminusModule } from "@tsed/terminus";

See /packages/third-parties/terminus/src/types/TerminusModule.ts.

Overview

ts
class TerminusModule implements OnInit {
    
    
    $onInit(): void;
    getConfiguration(): {
        caseInsensitive?: boolean | undefined;
        timeout?: number | undefined;
        signal?: string | undefined;
        signals?: string[] | undefined;
        sendFailuresDuringShutdown?: boolean | undefined;
        statusOk?: number | undefined;
        statusOkResponse?: Record<string, unknown> | undefined;
        statusError?: number | undefined;
        statusErrorResponse?: Record<string, unknown> | undefined;
        useExit0?: boolean | undefined;
        logger: (event: string, error: any) => any;
        headers?: {
            [key: string]: string;
        } | undefined;
        healthChecks: Record<string, any>;
        onSignal: (...args: any[]) => Promise<void>;
        onShutdown: (...args: any[]) => Promise<void>;
        beforeShutdown: (...args: any[]) => Promise<void>;
        onSendFailureDuringShutdown: (...args: any[]) => Promise<void>;
    };
    $logRoutes(routes: PlatformRouteDetails[]): Promise<PlatformRouteDetails[]>;
    
    
}

$onInit

ts
$onInit(): void;

getConfiguration

ts
getConfiguration(): {
     caseInsensitive?: boolean | undefined;
     timeout?: number | undefined;
     signal?: string | undefined;
     signals?: string[] | undefined;
     sendFailuresDuringShutdown?: boolean | undefined;
     statusOk?: number | undefined;
     statusOkResponse?: Record<string, unknown> | undefined;
     statusError?: number | undefined;
     statusErrorResponse?: Record<string, unknown> | undefined;
     useExit0?: boolean | undefined;
     logger: (event: string, error: any) => any;
     headers?: {
         [key: string]: string;
     } | undefined;
     healthChecks: Record<string, any>;
     onSignal: (...args: any[]) => Promise<void>;
     onShutdown: (...args: any[]) => Promise<void>;
     beforeShutdown: (...args: any[]) => Promise<void>;
     onSendFailureDuringShutdown: (...args: any[]) => Promise<void>;
 };

$logRoutes

ts
$logRoutes(routes: PlatformRouteDetails[]): Promise<PlatformRouteDetails[]>;

Released under the MIT License.