1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-04 01:24:09 +02:00

presets wip

This commit is contained in:
Robin Appelman 2023-07-16 16:39:29 +02:00
commit fdcb8de4f2
17 changed files with 192 additions and 120 deletions

View file

@ -77,7 +77,7 @@ impl ServiceTrait for ObjectStore {
cloud_id: &str,
network: &str,
_config: &HazeConfig,
) -> Result<String> {
) -> Result<Option<String>> {
pull_image(docker, self.image()).await?;
let options = Some(CreateContainerOptions {
name: format!("{}-object", cloud_id),
@ -114,7 +114,7 @@ impl ServiceTrait for ObjectStore {
.start_container::<String>(&id, None)
.await
.into_diagnostic()?;
Ok(id)
Ok(Some(id))
}
async fn is_healthy(&self, docker: &Docker, cloud_id: &str) -> Result<bool> {
@ -134,7 +134,7 @@ impl ServiceTrait for ObjectStore {
}
_ => {
let info = docker
.inspect_container(&self.container_name(cloud_id), None)
.inspect_container(&self.container_name(cloud_id).unwrap(), None)
.await
.into_diagnostic()?;
Ok(matches!(
@ -148,8 +148,8 @@ impl ServiceTrait for ObjectStore {
}
}
fn container_name(&self, cloud_id: &str) -> String {
format!("{}-object", cloud_id)
fn container_name(&self, cloud_id: &str) -> Option<String> {
Some(format!("{}-object", cloud_id))
}
fn apps(&self) -> &'static [&'static str] {