[−][src]Struct tsunami::MachineSetup
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]
F: Fn(&mut Session) -> Result<(), Error> + 'static + Sync,
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
impl !RefUnwindSafe for MachineSetup
impl !Send for MachineSetup
impl Sync for MachineSetup
impl Unpin for MachineSetup
impl !UnwindSafe for MachineSetup
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,