pub use bmux_playbook::sandbox::SandboxStartOptions;
pub struct SandboxServer(bmux_playbook::sandbox::SandboxServer);
impl SandboxServer {
pub async fn start(options: SandboxStartOptions<'_>) -> anyhow::Result<Self> {
Ok(Self(
bmux_playbook::sandbox::SandboxServer::start(options, super::engine::host()).await?,
))
}
pub async fn shutdown(self, retain: bool) -> anyhow::Result<()> {
self.0.shutdown(retain).await
}
}
impl std::ops::Deref for SandboxServer {
type Target = bmux_playbook::sandbox::SandboxServer;
fn deref(&self) -> &Self::Target {
&self.0
}
}