mirror of
https://github.com/rustfs/rustfs.git
synced 2026-03-17 14:24:08 +00:00
run init
This commit is contained in:
@@ -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(),
|
||||
)?);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user