Custom Processes

Allow to set custom processes to spawn after the network is up.

TOML

[[custom_processes]]
name = "eth-rpc"
command = "eth-rpc"
args = [ "--flag", "--other=1" ]
env = [
    { name = "RUST_LOG", value = "info" }
]

[[custom_processes]]
name = "other"
command = "some-binary"
args = [ "--flag", "--other-flag" ]

Builder

#![allow(unused)]
fn main() {
let config = NetworkConfigBuilder::new()
    .with_relaychain(|r| { /* ... */ })
    .with_custom_process(|c| c.with_name("eth-rpc").with_command("eth-rpc"))
}
#![allow(unused)]
fn main() {
let cp = CustomProcessBuilder::new()
    .with_name("eth-rpc")
    .with_command("eth-rpc")
    .with_args(vec!["--flag".into()])
    .with_env(vec![("Key", "Value")])
    .build()
    .unwrap();
}

Reference

OptionTypeDefaultDescription
nameStringRequired. Name of the process
commandStringRequired. Command to execute
imageString-Container image
argsArrayCLI arguments
envArrayEnvironment variables as {name, value} pairs