Skip to main content

paygress/
lib.rs

1// Paygress Library
2//
3// Exports modules for use in binaries.
4//
5// Architecture notes:
6// - **Canonical control plane (default)**: Nostr NIP-17 →
7//   `ProviderService` → `ProxmoxClient` / `LxdBackend`. Always
8//   compiled.
9// - **Legacy K8s + ngx_l402 + HTTP control plane** (gated behind the
10//   `kubernetes` Cargo feature, off by default since Unit 7): nginx
11//   + ngx_l402 → `PodProvisioningService`. Kept compilable so
12//   existing K8s users can opt back in with
13//   `--features kubernetes`, but no longer in the default build
14//   path so engineering capacity flows to the canonical plane.
15
16// Core modules — always compiled.
17pub mod blossom;
18pub mod blossom_crypto;
19pub mod cashu;
20pub mod client;
21pub mod durable_workload;
22pub mod nostr;
23pub mod observatory;
24pub mod reputation;
25pub mod stake;
26pub mod templates;
27pub mod volume_encryption;
28
29// Proxmox / LXD canonical control plane — always compiled.
30pub mod compute;
31pub mod discovery;
32pub mod docker;
33pub mod kvm;
34pub mod luks;
35pub mod lxd;
36pub mod provider;
37pub mod proxmox;
38
39// Legacy K8s pipeline — feature-gated behind `kubernetes`.
40#[cfg(feature = "kubernetes")]
41pub mod pod_provisioning;
42#[cfg(feature = "kubernetes")]
43pub mod sidecar_service;
44
45// Re-export public types and functions (always-compiled surface).
46pub use compute::{ComputeBackend, ContainerConfig, NodeStatus};
47pub use discovery::DiscoveryClient;
48pub use lxd::LxdBackend;
49pub use nostr::{custom_relay_config, default_relay_config, NostrRelaySubscriber, RelayConfig};
50pub use nostr::{
51    AccessDetailsContent, CapacityInfo, EncryptedTopUpPodRequest, ErrorResponseContent,
52    HeartbeatContent, IsolationLevel, LeaseRevocationContent, PrivateRequest, ProviderFilter,
53    ProviderInfo, ProviderOfferContent, StatusRequestContent, StatusResponseContent,
54    TemplateAccessPort, TopUpResponseContent, KIND_LEASE_REVOCATION, SCHEMA_VERSION,
55};
56pub use provider::{ProviderConfig, ProviderService};
57pub use proxmox::ProxmoxClient;
58
59// K8s-only re-export.
60#[cfg(feature = "kubernetes")]
61pub use cashu::initialize_cashu;