import type { Logger } from '../core/types/Logger.js'; import type { ShutdownEntry } from './types/ShutdownEntry.js'; /** * Helps to gracefully shut down your application. * Provide in list objects. The objects contains a name and a promise function which should be executed. * * The execution of array list functions is done sequential. * * @example * ```typescript * const shutDownList = [ * { * name: `${serviceA.info.serviceName} version ${serviceA.info.serviceVersion}`, * fn: serviceA.destroy * }, * { * name: `${serviceB.info.serviceName} version ${serviceB.info.serviceVersion}`, * fn: serviceB.destroy * }, * { * name: eventbridge.name, * fn: eventbridge.destroy * } * ] * gracefulShutdown(logger, shutDownList) * * // will shutdown ServiceA, then ServiceB, then the event bridge * ``` * * @param logger the logger object * @param list a object containing name and function * @param timeoutMs in ms to shut @default 30000 milliseconds * * @group Helper */ export declare const gracefulShutdown: (logger: Logger, list: ShutdownEntry[], timeoutMs?: number) => void; //# sourceMappingURL=gracefulShutdown.impl.d.ts.map