mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 04:47:43 +00:00
run init
This commit is contained in:
+4
-1
@@ -39,7 +39,10 @@ async fn run(opt: config::Opt) -> Result<()> {
|
||||
debug!("opt: {:?}", &opt);
|
||||
// Setup S3 service
|
||||
let service = {
|
||||
let mut b = S3ServiceBuilder::new(storage::ecfs::EC::new(opt.volumes)?);
|
||||
let mut b = S3ServiceBuilder::new(storage::ecfs::EC::new(
|
||||
opt.address.clone(),
|
||||
opt.volumes.clone(),
|
||||
)?);
|
||||
|
||||
// Enable authentication
|
||||
if let (Some(ak), Some(sk)) = (opt.access_key, opt.secret_key) {
|
||||
|
||||
@@ -13,8 +13,8 @@ pub struct EC {
|
||||
}
|
||||
|
||||
impl EC {
|
||||
pub fn new(endpoints: Vec<String>) -> Result<Self> {
|
||||
let store = ECStore::new(endpoints)?;
|
||||
pub fn new(address: String, endpoints: Vec<String>) -> Result<Self> {
|
||||
let store = ECStore::new(address, endpoints)?;
|
||||
Ok(EC { store })
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user