UNPKG

@hirosystems/api-toolkit

Version:
18 lines (17 loc) 507 B
type ShutdownHandler = () => void | PromiseLike<void>; type ShutdownConfig = { name: string; handler: ShutdownHandler; forceKillable: boolean; forceKillHandler?: ShutdownHandler; }; /** * Start a graceful API shutdown. */ export declare function shutdown(): Promise<void>; /** * Register shutdown handlers for different API components. * @param configs - Array of shutdown configurations */ export declare function registerShutdownConfig(...configs: ShutdownConfig[]): void; export {};