wip library to store cold objects in s3, warm objects on disk, and hot objects in memory
nodejs
typescript
1/**
2 * Tiered Storage Library
3 *
4 * A lightweight, pluggable tiered storage library that orchestrates caching across
5 * hot (memory), warm (disk/database), and cold (S3/object storage) tiers.
6 *
7 * @packageDocumentation
8 */
9
10// Main class
11export { TieredStorage } from './TieredStorage.js';
12
13// Built-in tier implementations
14export { MemoryStorageTier, type MemoryStorageTierConfig } from './tiers/MemoryStorageTier.js';
15export { DiskStorageTier, type DiskStorageTierConfig, type EvictionPolicy } from './tiers/DiskStorageTier.js';
16export { S3StorageTier, type S3StorageTierConfig } from './tiers/S3StorageTier.js';
17
18// Types
19export type {
20 StorageTier,
21 StorageMetadata,
22 TierStats,
23 TierGetResult,
24 AllTierStats,
25 TieredStorageConfig,
26 PlacementRule,
27 SetOptions,
28 StorageResult,
29 SetResult,
30 StorageSnapshot,
31} from './types/index.js';
32
33// Utilities
34export { compress, decompress, isGzipped } from './utils/compression.js';
35export { defaultSerialize, defaultDeserialize } from './utils/serialization.js';
36export { calculateChecksum, verifyChecksum } from './utils/checksum.js';
37export { encodeKey, decodeKey } from './utils/path-encoding.js';