UNPKG

@casoon/auditmysite

Version:

Professional website analysis suite with robust accessibility testing, Core Web Vitals performance monitoring, SEO analysis, and content optimization insights. Features isolated browser contexts, retry mechanisms, and comprehensive API endpoints for profe

127 lines 3.5 kB
/** * 🔧 Unified Queue System * * Main class that provides a unified interface for all queue types. * Uses the Adapter Pattern to provide consistent API regardless of implementation. */ import { QueueType, QueueConfig, QueueStatistics, QueueProcessor, QueueResult, QueueEventCallbacks } from './types'; export declare class UnifiedQueue<T = any> { private adapter; private type; private config; constructor(type?: QueueType, config?: QueueConfig, callbacks?: QueueEventCallbacks<T>); /** * Create queue optimized for accessibility testing */ static forAccessibilityTesting<T = any>(type?: QueueType, customConfig?: Partial<QueueConfig>, callbacks?: QueueEventCallbacks<T>): UnifiedQueue<T>; /** * Add items to the queue */ enqueue(data: T[], options?: { priority?: number; }): string[]; /** * Add a single item to the queue */ enqueueOne(data: T, priority?: number): string; /** * Process all items in the queue */ process(processor: QueueProcessor<T>): Promise<QueueResult<T>>; /** * Get queue statistics */ getStatistics(): QueueStatistics; /** * Pause queue processing */ pause(): void; /** * Resume queue processing */ resume(): void; /** * Clear all items from the queue */ clear(): void; /** * Update queue configuration */ configure(config: Partial<QueueConfig>): void; /** * Get current configuration */ getConfiguration(): QueueConfig; /** * Get queue type */ getType(): QueueType; /** * Check if queue is currently processing */ isActive(): boolean; /** * Get all queue items */ getItems(): import("./types").QueueItem<T>[]; /** * Get items by status */ getItemsByStatus(status: 'pending' | 'processing' | 'completed' | 'failed' | 'retrying'): import("./types").QueueItem<T>[]; /** * Get queue size */ size(): number; /** * Check if queue is empty */ isEmpty(): boolean; /** * Get performance metrics */ getPerformanceMetrics(): { throughput: number; averageDuration: number; efficiency: number; errorRate: number; memoryUsage: number; cpuUsage: number; }; /** * Export queue state for debugging */ exportState(): { type: QueueType; config: QueueConfig; statistics: QueueStatistics; items: { id: string; status: "pending" | "completed" | "failed" | "retrying" | "processing"; priority: number; attempts: number; duration: number | undefined; error: string | undefined; }[]; timestamp: string; }; /** * Clean up queue resources */ cleanup(): Promise<void>; /** * Create progress reporter that updates at regular intervals */ createProgressReporter(interval?: number): () => void; /** * Wait for queue to complete processing */ waitForCompletion(checkInterval?: number): Promise<void>; /** * Process items with automatic retry and progress reporting */ processWithProgress<R = any>(items: T[], processor: QueueProcessor<T, R>, options?: { showProgress?: boolean; progressInterval?: number; }): Promise<QueueResult<T>>; } //# sourceMappingURL=unified-queue.d.ts.map