UNPKG

@obarlik/streaming-pipeline-core

Version:

🔄 Memory-efficient circular buffer streaming pipeline with universal processing - by Codechu

35 lines (34 loc) • 1.02 kB
/** * External service interfaces - injectable from outside */ export interface ILogger { debug(message: string, meta?: any): void; info(message: string, meta?: any): void; warn(message: string, meta?: any): void; error(message: string, meta?: any): void; } export interface IMetrics { increment(metric: string, tags?: Record<string, string>): void; timing(metric: string, duration: number, tags?: Record<string, string>): void; gauge(metric: string, value: number, tags?: Record<string, string>): void; } export interface IContainer { get<T>(token: string): T; has(token: string): boolean; } export declare const SERVICE_TOKENS: { readonly LOGGER: "logger"; readonly METRICS: "metrics"; readonly CONTAINER: "container"; }; export declare class NoOpLogger implements ILogger { debug(): void; info(): void; warn(): void; error(): void; } export declare class NoOpMetrics implements IMetrics { increment(): void; timing(): void; gauge(): void; }