* Introduced a new HTML frontend for network speed testing with a responsive UI * Implemented backend server functionality to serve the frontend and handle speed test APIs * Added speed test logic for downloading and uploading data, including progress tracking and result validation * Created README-SPEEDTEST.md for documentation on application architecture, setup, and usage. * Updated package.json to include necessary scripts and dependencies for development and testing
20 lines
536 B
TypeScript
20 lines
536 B
TypeScript
import type { IRequestRepository } from '../core/interfaces/IRequestRepository';
|
|
import type { SpeedTestContext } from '../core/domain/SpeedTestTypes';
|
|
|
|
export class InMemoryRequestRepository implements IRequestRepository {
|
|
private readonly _storage: Record<string, SpeedTestContext> = {};
|
|
|
|
save(id: string, context: SpeedTestContext): void {
|
|
this._storage[id] = context;
|
|
}
|
|
|
|
get(id: string): SpeedTestContext | undefined {
|
|
return this._storage[id];
|
|
}
|
|
|
|
delete(id: string): void {
|
|
delete this._storage[id];
|
|
}
|
|
}
|
|
|