mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-08-07 15:23:10 +00:00
34 lines
798 B
Rust
34 lines
798 B
Rust
use serde::Serialize;
|
|
|
|
mod node;
|
|
|
|
pub use node::{
|
|
BinaryConfigNodeSpec, EnvEntry, LoopbackNodeRuntimeSpec, NodeDescriptor,
|
|
binary_config_node_runtime_spec, build_binary_config_node_descriptors,
|
|
build_binary_config_node_descriptors_with_file_name, build_loopback_node_descriptors,
|
|
};
|
|
|
|
/// Top-level docker-compose descriptor built from an environment-specific
|
|
/// topology.
|
|
#[derive(Clone, Debug, Serialize)]
|
|
pub struct ComposeDescriptor {
|
|
nodes: Vec<NodeDescriptor>,
|
|
}
|
|
|
|
impl ComposeDescriptor {
|
|
#[must_use]
|
|
pub fn new(nodes: Vec<NodeDescriptor>) -> Self {
|
|
Self { nodes }
|
|
}
|
|
|
|
#[must_use]
|
|
pub fn nodes(&self) -> &[NodeDescriptor] {
|
|
&self.nodes
|
|
}
|
|
|
|
#[cfg(test)]
|
|
pub fn test_nodes(&self) -> &[NodeDescriptor] {
|
|
self.nodes()
|
|
}
|
|
}
|