1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//! The library behind the `decdn-node` daemon: a deCDN node that caches
//! content-addressed blobs and serves them over iroh QUIC for per-megabyte USDC
//! payment.
//!
//! The `decdn-node` binary is a thin shell. It parses `--config` and a single
//! `run` subcommand, and calls [`commands::run`]. This library exists so the
//! daemon's integration tests can drive its parts. It is not an SDK, and its
//! API carries no stability promise. To fetch from deCDN, use
//! [`decdn-client`]. The user-facing `decdn` CLI is the [`decdn-cli`] crate.
//!
//! # Modules
//!
//! | Area | Modules |
//! |---|---|
//! | Bring-up | [`commands`] (the entry point), [`runtime`] (the iroh endpoint, the protocol router, and the background tasks) |
//! | Serving | [`handlers`] (one handler per ALPN), [`dispatch`] and [`rate_limit`] (per-source limits), [`load_shed`] (overload shedding), [`serve_economics`] and [`warming_allowance`] (when a cache-miss relay pays) |
//! | Cache misses | [`node_origin`] (the paid node-to-node pull-through origin), [`selection`] (provider choice), [`dht`] (the content DHT) |
//! | Payment | [`payment_settlement`] (seller-side redemption), [`buyer_pool`] and [`buyer_ledgers`] (buyer-side pools and lanes), [`pool_store`] and [`pool_view`] (lane state), [`onchain_tx`] (transaction submission) |
//! | Chain watchers | [`chain_events`], [`blacklist_watcher`], [`slash_watcher`], [`fee_shares_watcher`], [`chain_freshness`], [`binding_check`] |
//! | Compliance | [`content_deny`] (the origin deny-set) |
//! | Operations | [`admin`] (the loopback admin JSON-RPC server, [Local Admin HTTP]), [`metrics`], [`receipt_log`], [`systemd_watchdog`] |
//!
//! Wire types live in [`decdn_protocol`]. The config schema and admin RPC types
//! that the daemon shares with the CLI live in [`decdn_common`].
//!
//! [`decdn-client`]: https://docs.rs/decdn-client
//! [`decdn-cli`]: https://docs.rs/decdn-cli
//! [Local Admin HTTP]: https://github.com/decdn/decdn/blob/main/adr/appendix-local-admin-http.md
pub
pub
pub
pub