pub struct SpawnLndConfig {
pub nodes: Vec<NodeConfig>,
pub bitcoind_image: String,
pub lnd_image: String,
pub nodes_per_bitcoind: usize,
pub keep_containers: bool,
pub startup_retry: RetryPolicy,
pub cluster_subnet: Option<String>,
}Expand description
Complete cluster configuration.
Fields§
§nodes: Vec<NodeConfig>LND node definitions, in spawn order.
bitcoind_image: StringDocker image for Bitcoin Core containers.
lnd_image: StringDocker image for LND containers.
nodes_per_bitcoind: usizeNumber of LND nodes backed by each Bitcoin Core container.
keep_containers: boolWhether cluster shutdown and startup rollback should preserve containers.
startup_retry: RetryPolicyRetry policy used for daemon startup and readiness checks.
cluster_subnet: Option<String>Optional IPv4 subnet used for the managed Docker bridge network.
When omitted, this crate chooses an explicit private subnet so Docker accepts static container IP assignment.
Implementations§
Source§impl SpawnLndConfig
impl SpawnLndConfig
Sourcepub fn builder() -> SpawnLndBuilder
pub fn builder() -> SpawnLndBuilder
Create a builder using defaults and environment overrides.
Sourcepub async fn spawn(self) -> Result<SpawnedCluster, SpawnError>
pub async fn spawn(self) -> Result<SpawnedCluster, SpawnError>
Spawn a Docker-backed cluster from this configuration.
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validate this configuration without spawning containers.
Sourcepub fn chain_group_count(&self) -> usize
pub fn chain_group_count(&self) -> usize
Return the number of Bitcoin Core chain groups implied by this config.
Sourcepub fn node_aliases(&self) -> impl Iterator<Item = &str>
pub fn node_aliases(&self) -> impl Iterator<Item = &str>
Iterate configured LND aliases in spawn order.
Trait Implementations§
Source§impl Clone for SpawnLndConfig
impl Clone for SpawnLndConfig
Source§fn clone(&self) -> SpawnLndConfig
fn clone(&self) -> SpawnLndConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpawnLndConfig
impl Debug for SpawnLndConfig
Source§impl<'de> Deserialize<'de> for SpawnLndConfig
impl<'de> Deserialize<'de> for SpawnLndConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for SpawnLndConfig
impl PartialEq for SpawnLndConfig
Source§impl Serialize for SpawnLndConfig
impl Serialize for SpawnLndConfig
impl Eq for SpawnLndConfig
impl StructuralPartialEq for SpawnLndConfig
Auto Trait Implementations§
impl Freeze for SpawnLndConfig
impl RefUnwindSafe for SpawnLndConfig
impl Send for SpawnLndConfig
impl Sync for SpawnLndConfig
impl Unpin for SpawnLndConfig
impl UnsafeUnpin for SpawnLndConfig
impl UnwindSafe for SpawnLndConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request