svelte-firebase-upload
Version:
Enterprise-grade file upload manager for Svelte with Firebase Storage integration, featuring concurrent uploads, resumable transfers, validation, health monitoring, and plugin system
33 lines (32 loc) • 986 B
TypeScript
import type { BandwidthConfig } from '../types.js';
export declare class BandwidthManager {
private _config;
private _throttleInfo;
private _isThrottling;
private _uploadQueue;
private _currentBandwidth;
private _bandwidthHistory;
private _throttleTimeout?;
constructor(config?: Partial<BandwidthConfig>);
private _validateConfig;
throttleUpload(bytesToUpload: number): Promise<void>;
updateBandwidthUsage(bytesUploaded: number, timeMs: number): void;
getCurrentBandwidth(): number;
getAverageBandwidth(): number;
isWithinLimits(): boolean;
adjustBandwidth(): void;
setBandwidthLimit(mbps: number): void;
getRecommendedChunkSize(): number;
pause(): void;
resume(): void;
destroy(): void;
getBandwidthStats(): {
current: number;
average: number;
peak: number;
limit: number;
utilization: number;
};
private _startThrottling;
private _processUpload;
}