Skip to main content

Module data_dir

Module data_dir 

Source
Expand description

Which files live in a data_dir, and whose they are.

A decdn-node daemon and a standalone client can be pointed at the same directory, and they keep different stores there. The buyer pools are the pair that matters: the daemon’s NODE_BUYER_DB_FILE and the client’s CLIENT_BUYER_DB_FILE share one table format and nothing else — different pools, different owners, and redb holds a process-exclusive lock on the daemon’s for its lifetime, so no other process can open it.

Naming them here rather than in each crate is what lets an operator tool tell the two apart before it writes to the wrong one (#2078).

Constants§

CLIENT_BUYER_DB_FILE
The standalone client’s buyer-only pool store (decdn fetch, decdn pool).
DAEMON_STORE_FILES
Every store file a decdn-node daemon owns in its data dir.
NODE_BUYER_DB_FILE
The daemon’s buyer-pool store: buyer pool state and its owner index.
NODE_CHECKPOINT_DB_FILE
The daemon’s settlement-watcher checkpoint store.
NODE_LANES_DB_FILE
The daemon’s seller-side per-lane voucher store.
NODE_SETTLE_DB_FILE
The daemon’s pending-settle store (seller and buyer sets).

Functions§

daemon_marker
The daemon-owned file that marks data_dir as a node’s, if any.