Struct hydro::core::gcp::GCPComputeEngineHost
source · pub struct GCPComputeEngineHost {
pub id: usize,
pub project: String,
pub machine_type: String,
pub image: String,
pub region: String,
pub network: Arc<RwLock<GCPNetwork>>,
pub user: Option<String>,
pub launched: Option<Arc<LaunchedComputeEngine>>,
/* private fields */
}Fields§
§id: usize§project: String§machine_type: String§image: String§region: String§network: Arc<RwLock<GCPNetwork>>§user: Option<String>§launched: Option<Arc<LaunchedComputeEngine>>Implementations§
Trait Implementations§
source§impl Host for GCPComputeEngineHost
impl Host for GCPComputeEngineHost
fn target_type(&self) -> HostTargetType
fn request_port(&mut self, bind_type: &ServerStrategy)
source§fn request_custom_binary(&mut self)
fn request_custom_binary(&mut self)
Configures the host to support copying and running a custom binary.
source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns a reference to the host as a trait object.
source§fn collect_resources(&self, resource_batch: &mut ResourceBatch)
fn collect_resources(&self, resource_batch: &mut ResourceBatch)
Makes requests for physical resources (servers) that this host needs to run.
fn launched(&self) -> Option<Arc<dyn LaunchedHost>>
source§fn provision<'life0, 'life1, 'async_trait>(
&'life0 mut self,
resource_result: &'life1 Arc<ResourceResult>
) -> Pin<Box<dyn Future<Output = Arc<dyn LaunchedHost>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn provision<'life0, 'life1, 'async_trait>( &'life0 mut self, resource_result: &'life1 Arc<ResourceResult> ) -> Pin<Box<dyn Future<Output = Arc<dyn LaunchedHost>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Connects to the acquired resources and prepares the host to run services.
source§fn strategy_as_server<'a>(
&'a self,
client_host: &dyn Host
) -> Result<(ClientStrategy<'a>, Box<dyn FnOnce(&mut dyn Any) -> ServerStrategy>)>
fn strategy_as_server<'a>( &'a self, client_host: &dyn Host ) -> Result<(ClientStrategy<'a>, Box<dyn FnOnce(&mut dyn Any) -> ServerStrategy>)>
Identifies a network type that this host can use for connections if it is the server.
The host will be
None if the connection is from the same host as the target.source§fn can_connect_to(&self, typ: ClientStrategy<'_>) -> bool
fn can_connect_to(&self, typ: ClientStrategy<'_>) -> bool
Determines whether this host can connect to another host using the given strategy.
Auto Trait Implementations§
impl !RefUnwindSafe for GCPComputeEngineHost
impl Send for GCPComputeEngineHost
impl Sync for GCPComputeEngineHost
impl Unpin for GCPComputeEngineHost
impl !UnwindSafe for GCPComputeEngineHost
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