This commit is contained in:
weisd
2024-06-25 17:48:14 +08:00
parent 57a10e87b6
commit 918a263fd0
2 changed files with 6 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ async fn run(opt: config::Opt) -> Result<()> {
debug!("opt: {:?}", &opt);
// Setup S3 service
let service = {
let mut b = S3ServiceBuilder::new(storage::ecfs::EC::new(
let mut b = S3ServiceBuilder::new(storage::ecfs::FS::new(
opt.address.clone(),
opt.volumes.clone(),
)?);

View File

@@ -10,19 +10,19 @@ use anyhow::Result;
use ecstore::store::ECStore;
#[derive(Debug)]
pub struct EC {
store: ECStore,
pub struct FS {
pub store: ECStore,
}
impl EC {
impl FS {
pub fn new(address: String, endpoints: Vec<String>) -> Result<Self> {
let store: ECStore = ECStore::new(address, endpoints)?;
Ok(EC { store })
Ok(Self { store })
}
}
#[async_trait::async_trait]
impl S3 for EC {
impl S3 for FS {
#[tracing::instrument]
async fn create_bucket(
&self,