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 {
16 DiskStorageTier,
17 type DiskStorageTierConfig,
18 type EvictionPolicy,
19} from './tiers/DiskStorageTier.js';
20export { S3StorageTier, type S3StorageTierConfig } from './tiers/S3StorageTier.js';
21
22// Types
23export type {
24 StorageTier,
25 StorageMetadata,
26 TierStats,
27 TierGetResult,
28 TierStreamResult,
29 AllTierStats,
30 TieredStorageConfig,
31 PlacementRule,
32 SetOptions,
33 StreamSetOptions,
34 StorageResult,
35 StreamResult,
36 SetResult,
37 StorageSnapshot,
38} from './types/index.js';
39
40// Utilities
41export {
42 compress,
43 decompress,
44 isGzipped,
45 createCompressStream,
46 createDecompressStream,
47} from './utils/compression.js';
48export { defaultSerialize, defaultDeserialize } from './utils/serialization.js';
49export { calculateChecksum, verifyChecksum } from './utils/checksum.js';
50export { encodeKey, decodeKey } from './utils/path-encoding.js';