[][src]Struct tsunami::MachineSetup

pub struct MachineSetup { /* fields omitted */ }

A template for a particular machine setup in a tsunami.

Methods

impl MachineSetup[src]

pub fn new<F>(instance_type: &str, ami: &str, setup: F) -> Self where
    F: Fn(&mut Session) -> Result<(), Error> + 'static + Sync
[src]

Define a new template for a tsunami machine setup.

The given AWS EC2 instance type will be used. Note that only EC2 Defined Duration Spot Instance types are allowed.

The setup argument is called once for every spawned instances of this type with a handle to the target machine. Use Machine::ssh to issue commands on the host in question.

The new instance will start out in the state dictated by the Amazon Machine Image specified in ami.

MachineSetup::new("m5.large", "ami-e18aa89b", |ssh| {
    ssh.cmd("cat /etc/hostname").map(|out| {
        println!("{}", out);
    })
});

pub fn as_user(self, username: &str) -> Self[src]

Set the username to SSH into this machine type as.

Defaults to ec2-user.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,