pub struct ServerConfig {
pub port: u16,
pub ws_port: Option<u16>,
pub upstream_url: String,
pub upstream_ws_url: String,
pub rpc_timeout: Duration,
pub index_trees: Vec<String>,
pub db: Option<PathBuf>,
pub snapshots: Vec<PathBuf>,
}Fields§
§port: u16HTTP port to bind.
ws_port: Option<u16>Dedicated WebSocket port. When None, derives as port + 1.
Tests set this explicitly to avoid parallel port-allocation
races where two test runs pick adjacent HTTP ports and collide
on each other’s WS.
upstream_url: StringUpstream Solana RPC endpoint for passthrough + DAS fetch flow.
upstream_ws_url: StringUpstream WebSocket URL — used by the (future) signatureSubscribe
polyfill to forward non-polyfilled subscriptions. Defaults to
ws://<upstream host>:8900.
rpc_timeout: DurationRPC call timeout applied to every upstream fetch.
index_trees: Vec<String>Bubblegum trees to backfill on startup. Empty = cNFT support
disabled until a runtime tidepool_indexTree call.
db: Option<PathBuf>When set, persist cNFT/DAS/webhook state to a single SQLite
file. Mirrors Surfpool’s --db flag; accepts a filesystem
path (typically ending in .sqlite) or the string :memory:
for an explicit ephemeral run.
When None, stores run in-memory and state is lost on
restart. Default behavior.
snapshots: Vec<PathBuf>Snapshot files to load at boot, in order. Each file is a
SnapshotBlob envelope returned by
tidepool_exportTreeSnapshot. Applied before the HTTP server
starts accepting requests. Mirrors Surfpool’s --snapshot.
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more