Storage Data Model¶
Segment Model¶
segment.Segment and segment.Offer define the relay payload and pre-check metadata. Integrity is modeled as a BLAKE3 hash (BLAKE3Hash) and size recorded in metadata/index entries.
Index Structure¶
index.Entry stores:
IDBLAKE3HashSizeDurabilityClassReceivedAt,LastSeenAt, optionalEvictedAt
The index supports duplicate detection and retention-window semantics for evicted IDs.
Local Store API¶
storage.Store contract includes:
Write,Read,DeleteDiskUsed,Stats,Close
Error sentinels include ErrCeilingExceeded, ErrNotFound, ErrPathEscape, ErrCorrupt.
Disk Usage Accounting¶
Disk usage is defined as kernel-reported statfs output (not user-space estimates). WithDiskUsedFunc exists for deterministic unit tests.
Evidence¶
edge/segment/segment.goedge/index/index.goedge/storage/store.goedge/storage/localstore.goedge/storage/store_test.go