pub struct ForgeConfig {
pub prefix: String,
pub token_ttl_secs: u64,
pub max_body_bytes: usize,
pub fetch_concurrency: usize,
pub fetch_timeout_secs: u64,
pub thread_cap: usize,
pub default_chain: String,
pub allow_mainnet: bool,
pub announce_relays: Vec<String>,
}Expand description
All tunables for a crate::ForgeService.
Fields§
§prefix: StringURL prefix the forge is mounted under (default /forge). No
trailing slash.
token_ttl_secs: u64Time-to-live for a minted forge push token, in seconds.
max_body_bytes: usizePer-body byte cap when re-fetching pod-hosted issue/PR bodies (default 64 KiB).
fetch_concurrency: usizeParallelism for the read-time body fetch (default 8).
fetch_timeout_secs: u64Per-body fetch timeout, seconds (default 8).
thread_cap: usizeHard cap on thread pointers materialised in one read (default 500).
default_chain: StringBitcoin chain the mark trail targets. "tbtc4" (testnet4) by
default; mainnet ("btc"/"mainnet") is refused unless
ForgeConfig::allow_mainnet is set.
allow_mainnet: boolFail-closed mainnet guard. When false, [chain_allowed] rejects
any mainnet chain string. Mark custody here is testnet-grade.
announce_relays: Vec<String>Opt-in relays the NIP-34 announcement is published to. Empty = build/sign only, never publish.
Implementations§
Source§impl ForgeConfig
impl ForgeConfig
Sourcepub fn normalized_prefix(&self) -> String
pub fn normalized_prefix(&self) -> String
Normalise the configured prefix: ensure a single leading slash and
no trailing slash. "" and "/" both normalise to "" (root
mount).
Sourcepub fn chain_allowed(&self, chain: &str) -> bool
pub fn chain_allowed(&self, chain: &str) -> bool
Is chain permitted under the current mainnet policy? Mainnet
aliases are refused unless allow_mainnet.
Trait Implementations§
Source§impl Clone for ForgeConfig
impl Clone for ForgeConfig
Source§fn clone(&self) -> ForgeConfig
fn clone(&self) -> ForgeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more