pub struct CloudInitConfig {
pub leader_addr: String,
pub join_token: String,
pub provision_cmd: String,
pub terminate_cmd: String,
pub describe_cmd: Option<String>,
pub user_data_template: String,
pub hourly_usd: f64,
}Expand description
Configuration for CloudInitProvisioner.
provision_cmd and terminate_cmd are shell command templates. The
following placeholders are substituted before the command is run:
{user_data}— the rendered cloud-init document (provision only){provider_id}— the node’s provider id (terminate only){cpu}— requested vCPU count (provision only){memory_mb}— requested memory in mebibytes (provision only){labels}— comma-separatedk=vlabels (provision only){zone}— requested zone, or empty (provision only){capacity}—on-demandorspot(provision only)
Fields§
§leader_addr: StringAddress of the cluster leader new nodes should join.
join_token: StringBootstrap join token embedded in the user-data.
provision_cmd: StringShell template that creates a node and prints its provider id to stdout.
terminate_cmd: StringShell template that terminates a node by {provider_id}.
describe_cmd: Option<String>Optional shell template that lists nodes (see
CloudProvisioner::describe).
user_data_template: Stringcloud-init user-data template (see
CloudInitProvisioner::render_user_data).
hourly_usd: f64Flat hourly price used for CloudProvisioner::price_hint.
Trait Implementations§
Source§impl Clone for CloudInitConfig
impl Clone for CloudInitConfig
Source§fn clone(&self) -> CloudInitConfig
fn clone(&self) -> CloudInitConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CloudInitConfig
impl Debug for CloudInitConfig
Source§impl<'de> Deserialize<'de> for CloudInitConfig
impl<'de> Deserialize<'de> for CloudInitConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CloudInitConfig
impl RefUnwindSafe for CloudInitConfig
impl Send for CloudInitConfig
impl Sync for CloudInitConfig
impl Unpin for CloudInitConfig
impl UnsafeUnpin for CloudInitConfig
impl UnwindSafe for CloudInitConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more