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

add notify_push service

This commit is contained in:
Robin Appelman 2021-07-30 19:12:58 +02:00
commit 93c20bc530
10 changed files with 224 additions and 45 deletions

View file

@ -1,3 +1,4 @@
use crate::config::HazeConfig;
use crate::exec::exec;
use crate::image::pull_image;
use crate::service::ServiceTrait;
@ -40,7 +41,13 @@ impl ServiceTrait for ObjectStore {
}
}
async fn spawn(&self, docker: &Docker, cloud_id: &str, network: &str) -> Result<String> {
async fn spawn(
&self,
docker: &Docker,
cloud_id: &str,
network: &str,
_config: &HazeConfig,
) -> Result<String> {
pull_image(docker, self.image()).await?;
let options = Some(CreateContainerOptions {
name: format!("{}-object", cloud_id),
@ -90,15 +97,7 @@ impl ServiceTrait for ObjectStore {
format!("{}-object", cloud_id)
}
async fn start_message(&self, _docker: &Docker, _cloud_id: &str) -> Result<Option<String>> {
Ok(None)
}
fn apps(&self) -> &'static [&'static str] {
&["files_external"]
}
async fn post_setup(&self, _docker: &Docker, _cloud_id: &str) -> Result<Vec<String>> {
Ok(Vec::new())
}
}