logs-interceptor
Version:
High-performance, production-ready log interceptor for Node.js applications with Loki integration. Built with Clean Architecture principles. Supports Node.js, Browser, and Node-RED.
14 lines • 652 B
TypeScript
/**
* Infrastructure: AsyncLocalStorage Context Provider
*/
import { IContextProvider } from '../../domain/interfaces/IContextProvider';
export declare class AsyncLocalStorageContextProvider implements IContextProvider {
private readonly asyncLocalStorage;
getContext(): Record<string, unknown>;
runWithContext<T>(context: Record<string, unknown>, fn: () => T): T;
runWithContextAsync<T>(context: Record<string, unknown>, fn: () => Promise<T>): Promise<T>;
set(key: string, value: unknown): void;
get<T = unknown>(key: string): T | undefined;
clear(): void;
}
//# sourceMappingURL=AsyncLocalStorageContextProvider.d.ts.map