mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 20:06:37 +00:00
run init
This commit is contained in:
Generated
-1
@@ -312,7 +312,6 @@ dependencies = [
|
|||||||
"netif",
|
"netif",
|
||||||
"reed-solomon-erasure",
|
"reed-solomon-erasure",
|
||||||
"regex",
|
"regex",
|
||||||
"s3s",
|
|
||||||
"serde",
|
"serde",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|||||||
@@ -23,6 +23,5 @@ lazy_static = "1.5.0"
|
|||||||
regex = "1.10.5"
|
regex = "1.10.5"
|
||||||
netif = "0.1.6"
|
netif = "0.1.6"
|
||||||
async-trait = "0.1.80"
|
async-trait = "0.1.80"
|
||||||
s3s = "0.10.0"
|
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracing-error = "0.2.0"
|
tracing-error = "0.2.0"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ pub struct ECStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl ECStore {
|
impl ECStore {
|
||||||
pub fn new(endpoints: Vec<String>, address: String) -> Result<Self> {
|
pub fn new(address: String, endpoints: Vec<String>) -> Result<Self> {
|
||||||
let layouts = DisksLayout::new(endpoints)?;
|
let layouts = DisksLayout::new(endpoints)?;
|
||||||
|
|
||||||
let (pools, _) = create_server_endpoints(address, &layouts.pools, layouts.legacy)?;
|
let (pools, _) = create_server_endpoints(address, &layouts.pools, layouts.legacy)?;
|
||||||
|
|||||||
+4
-1
@@ -39,7 +39,10 @@ async fn run(opt: config::Opt) -> Result<()> {
|
|||||||
debug!("opt: {:?}", &opt);
|
debug!("opt: {:?}", &opt);
|
||||||
// Setup S3 service
|
// Setup S3 service
|
||||||
let 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
|
// Enable authentication
|
||||||
if let (Some(ak), Some(sk)) = (opt.access_key, opt.secret_key) {
|
if let (Some(ak), Some(sk)) = (opt.access_key, opt.secret_key) {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ pub struct EC {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl EC {
|
impl EC {
|
||||||
pub fn new(endpoints: Vec<String>) -> Result<Self> {
|
pub fn new(address: String, endpoints: Vec<String>) -> Result<Self> {
|
||||||
let store = ECStore::new(endpoints)?;
|
let store = ECStore::new(address, endpoints)?;
|
||||||
Ok(EC { store })
|
Ok(EC { store })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user