mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-04 01:24:09 +02:00
sharding option
This commit is contained in:
parent
e13f53e0e5
commit
ce0d3ff3e4
19 changed files with 248 additions and 121 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use crate::cloud::CloudOptions;
|
||||
use crate::config::HazeConfig;
|
||||
use crate::exec::exec;
|
||||
use crate::image::pull_image;
|
||||
|
|
@ -77,6 +78,7 @@ impl ServiceTrait for ObjectStore {
|
|||
cloud_id: &str,
|
||||
network: &str,
|
||||
_config: &HazeConfig,
|
||||
_options: &CloudOptions,
|
||||
) -> Result<Vec<String>> {
|
||||
pull_image(docker, self.image()).await?;
|
||||
let options = Some(CreateContainerOptions {
|
||||
|
|
@ -117,7 +119,15 @@ impl ServiceTrait for ObjectStore {
|
|||
Ok(vec![id])
|
||||
}
|
||||
|
||||
async fn is_healthy(&self, docker: &Docker, cloud_id: &str) -> Result<bool> {
|
||||
async fn is_healthy(
|
||||
&self,
|
||||
docker: &Docker,
|
||||
cloud_id: &str,
|
||||
_options: &CloudOptions,
|
||||
) -> Result<bool> {
|
||||
if !self.is_running(docker, cloud_id).await? {
|
||||
return Ok(false);
|
||||
}
|
||||
match self {
|
||||
ObjectStore::S3 | ObjectStore::S3mb => {
|
||||
let mut output = Vec::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue