pub struct Deployment {
pub hosts: Vec<Weak<dyn Host>>,
pub services: Vec<Weak<RwLock<dyn Service>>>,
pub resource_pool: ResourcePool,
/* private fields */
}Fields§
§hosts: Vec<Weak<dyn Host>>§services: Vec<Weak<RwLock<dyn Service>>>§resource_pool: ResourcePoolImplementations§
Source§impl Deployment
impl Deployment
pub fn new() -> Self
pub fn Localhost(&self) -> Arc<LocalhostHost>
pub fn CustomService( &mut self, on: Arc<dyn Host>, external_ports: Vec<u16>, ) -> Arc<RwLock<CustomService>>
Sourcepub async fn run_until(
&mut self,
trigger: impl Future<Output = ()>,
) -> Result<()>
pub async fn run_until( &mut self, trigger: impl Future<Output = ()>, ) -> Result<()>
Runs deploy(), and start(), waits for the trigger future, then runs stop().
Sourcepub async fn start_until(
&mut self,
trigger: impl Future<Output = ()>,
) -> Result<()>
pub async fn start_until( &mut self, trigger: impl Future<Output = ()>, ) -> Result<()>
Runs start(), waits for the trigger future, then runs stop().
This is useful if you need to initiate external network connections between
deploy() and start().
Sourcepub async fn run_ctrl_c(&mut self) -> Result<()>
pub async fn run_ctrl_c(&mut self) -> Result<()>
Runs deploy(), and start(), waits for CTRL+C, then runs stop().
Sourcepub async fn start_ctrl_c(&mut self) -> Result<()>
pub async fn start_ctrl_c(&mut self) -> Result<()>
Runs start(), waits for CTRL+C, then runs stop().
This is useful if you need to initiate external network connections between
deploy() and start().
pub async fn deploy(&mut self) -> Result<()>
pub async fn start(&mut self) -> Result<()>
pub async fn stop(&mut self) -> Result<()>
Source§impl Deployment
impl Deployment
Source§impl Deployment
Buildstructor methods.
impl Deployment
Buildstructor methods.
pub fn add_gcp_compute_engine_host( &mut self, project: String, machine_type: String, image: String, region: String, network: Arc<RwLock<GcpNetwork>>, user: Option<String>, startup_script: Option<String>, ) -> Arc<GcpComputeEngineHost>
pub fn add_azure_host( &mut self, project: String, os_type: String, machine_size: String, image: Option<HashMap<String, String>>, region: String, user: Option<String>, ) -> Arc<AzureHost>
Source§impl Deployment
impl Deployment
pub fn GcpComputeEngineHost( &mut self, ) -> AddGcpComputeEngineHostDeploymentBuilder<'_>
Source§impl Deployment
impl Deployment
pub fn AzureHost(&mut self) -> AddAzureHostDeploymentBuilder<'_>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Deployment
impl !RefUnwindSafe for Deployment
impl Send for Deployment
impl Sync for Deployment
impl Unpin for Deployment
impl !UnwindSafe for Deployment
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more