Trait hydro::core::LaunchedHost
source · pub trait LaunchedHost: Send + Sync {
// Required methods
fn server_config(&self, strategy: &ServerStrategy) -> ServerBindConfig;
fn launch_binary<'life0, 'life1, 'async_trait>(
&'life0 self,
id: String,
binary: Arc<(String, Vec<u8>, PathBuf)>,
args: &'life1 [String]
) -> Pin<Box<dyn Future<Output = Result<Arc<RwLock<dyn LaunchedBinary>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn forward_port<'life0, 'life1, 'async_trait>(
&'life0 self,
addr: &'life1 SocketAddr
) -> Pin<Box<dyn Future<Output = Result<SocketAddr>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
sourcefn server_config(&self, strategy: &ServerStrategy) -> ServerBindConfig
fn server_config(&self, strategy: &ServerStrategy) -> ServerBindConfig
Given a pre-selected network type, computes concrete information needed for a service to listen to network connections (such as the IP address to bind to).