import type { Knex } from 'knex'; import { type EventLoopMonitor } from './event-loop'; export { POOL_TIMEOUT_CODE } from './details'; export type { PoolState, PoolTimeoutDetails } from './details'; export type { EventLoopDelay } from './event-loop'; export { POOL_TIMEOUT_DOCS_URL } from './format'; export interface PoolDiagnosticsOptions { logger: { warn(message: string): void; }; getPhase?: () => string | undefined; now?: () => number; hostname?: string; pid?: number; intervalMs?: number; /** Injected in tests; null turns the event loop measurement off. */ eventLoopMonitor?: EventLoopMonitor | null; } export interface PoolDiagnostics { dispose(): void; } /** knex also uses KnexTimeoutError for query timeouts; only pool acquire timeouts are described. */ export declare const isPoolAcquireTimeout: (error: unknown) => error is Error; /** * Wraps acquireConnection on the knex client Strapi created. On a pool acquire timeout, the same * error object gets a deeper stack, a docs link and `details`; at most one warning block per * interval goes to the logger. Facts are collected before the error is changed, so a failure while * collecting leaves the error's class, name and message as knex made them (its stack may already be * deeper); a failing logger only loses the warning. An error that already carries `details` from * an earlier install is passed through. */ export declare const installPoolDiagnostics: (knex: Knex, options: PoolDiagnosticsOptions) => PoolDiagnostics; //# sourceMappingURL=index.d.ts.map