package granary

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Granary_storageSource

Sourcemodule Btree : sig ... end

Copy-on-write B+-tree over the Pager layer.

Sourcemodule Crypto : sig ... end

Per-page AES-256-GCM codec for at-rest encryption (#84).

Sourcemodule Freelist : sig ... end

In-memory freelist. Tracks freed pages and when they can be reused. A page freed at txn_id T becomes reusable when min_safe_txn_id > T (i.e. freed_at_txn_id < min_safe_txn_id). Pure — no I/O, no Lwt.

Sourcemodule Geometry : sig ... end

Page geometry (#95): the per-file choice of page_size and reserved_bytes_per_page, fixed at file creation and persisted in the header. Addressing is offset = page_id * page_size, so the size is uniform across a file and immutable once chosen.

Sourcemodule Header : sig ... end

Alternating two-header commit protocol for crash safety. Pages 0 and 1 hold the two alternating file headers. The header with the higher txn_id and valid CRC is the live state.

Sourcemodule Page : sig ... end

Page format codec for granary.

Sourcemodule Pager : sig ... end

Pager: page cache + allocator over a BLOCK backend.

Sourcemodule Pager_event : sig ... end
Sourcemodule Wal : sig ... end

Write-Ahead Log over byte-addressable storage.