UNPKG

polyv-live-cli

Version:

CLI tool for managing PolyV live streaming services.

65 lines 1.97 kB
export interface TimeSeriesPoint { timestamp: Date; value: number; } export interface TimeSeries { name: string; metric: string; channelId: string; points: TimeSeriesPoint[]; unit: string; aggregationType?: 'avg' | 'sum' | 'min' | 'max' | 'last'; } export interface TimeRange { start: Date; end: Date; } export interface AggregationConfig { interval: number; type: 'avg' | 'sum' | 'min' | 'max' | 'last'; } export interface TimeSeriesQuery { channelId?: string; metric?: string; timeRange?: TimeRange; limit?: number; aggregation?: AggregationConfig; } export declare class TimeSeriesProcessor { private series; private maxPointsPerSeries; private retentionPeriod; constructor(maxPointsPerSeries?: number, retentionPeriodHours?: number); addPoint(seriesKey: string, point: TimeSeriesPoint, metadata: { name: string; metric: string; channelId?: string; unit: string; aggregationType?: 'avg' | 'sum' | 'min' | 'max' | 'last'; }): void; addStreamMetrics(channelId: string, timestamp: Date, metrics: { bitrate?: number; fps?: number; viewerCount?: number; bandwidth?: number; uptime?: number; }): void; query(query?: TimeSeriesQuery): TimeSeries[]; getHistoricalData(channelId: string, metric: string, timeRange?: TimeRange): TimeSeries | null; getChannelMetrics(channelId: string, timeRange?: TimeRange): Map<string, TimeSeries>; private aggregatePoints; private cleanupOldData; clearAll(): void; clearChannel(channelId: string): void; getStats(): { seriesCount: number; totalPoints: number; oldestPoint?: Date; newestPoint?: Date; channelCount: number; metricTypes: string[]; }; exportToJSON(): string; importFromJSON(jsonData: string): void; } //# sourceMappingURL=time-series.processor.d.ts.map