[−][src]Function tsunami::make_multiple
pub fn make_multiple<M: Clone>(
n: usize,
nickname_prefix: &str,
m: M
) -> Vec<(String, M)>
Make multiple machine descriptors.
The nickname_prefix
is used to name the machines, indexed from 0 to n
:
#[tokio::main] async fn main() -> Result<(), color_eyre::Report> { use tsunami::{ Tsunami, make_multiple, providers::aws::{self, Setup}, }; let mut aws: aws::Launcher<_> = Default::default(); aws.spawn(make_multiple(3, "my_tsunami", Setup::default()), None).await?; let vms = aws.connect_all().await?; let my_first_vm = vms.get("my_tsunami-0").unwrap(); let my_last_vm = vms.get("my_tsunami-2").unwrap(); Ok(()) }