This commit is contained in:
weisd
2024-06-25 17:35:31 +08:00
parent d3714de65b
commit faeb477880
5 changed files with 7 additions and 6 deletions
+4 -1
View File
@@ -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) {
+2 -2
View File
@@ -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 })
}
}