mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-20 19:42:17 +00:00
Fix/main (#508)
* fix error * fix * fix cargo * fix openssl cfg * fix clippy * fix clippy * fix * fix clippy * fix clippy
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use bytes::Bytes;
|
||||
use http::status::StatusCode;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
use http::status::StatusCode;
|
||||
use rand::Rng;
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||
use tracing::warn;
|
||||
|
||||
#[derive(Serialize, Deserialize, Default, Debug, Clone)]
|
||||
#[serde(default)]
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::fmt::Display;
|
||||
use tracing::info;
|
||||
|
||||
const C_TierConfigVer: &str = "v1";
|
||||
const C_TIER_CONFIG_VER: &str = "v1";
|
||||
|
||||
const ERR_TIER_NAME_EMPTY: &str = "remote tier name empty";
|
||||
const ERR_TIER_INVALID_CONFIG: &str = "invalid tier config";
|
||||
@@ -112,7 +119,7 @@ impl Clone for TierConfig {
|
||||
version: self.version.clone(),
|
||||
tier_type: self.tier_type.clone(),
|
||||
name: self.name.clone(),
|
||||
s3: s3,
|
||||
s3,
|
||||
//azure: az,
|
||||
//gcs: gcs,
|
||||
rustfs: r,
|
||||
@@ -237,7 +244,7 @@ impl TierS3 {
|
||||
}
|
||||
|
||||
Ok(TierConfig {
|
||||
version: C_TierConfigVer.to_string(),
|
||||
version: C_TIER_CONFIG_VER.to_string(),
|
||||
tier_type: TierType::S3,
|
||||
name: name.to_string(),
|
||||
s3: Some(sc),
|
||||
@@ -306,7 +313,7 @@ impl TierMinIO {
|
||||
}
|
||||
|
||||
Ok(TierConfig {
|
||||
version: C_TierConfigVer.to_string(),
|
||||
version: C_TIER_CONFIG_VER.to_string(),
|
||||
tier_type: TierType::MinIO,
|
||||
name: name.to_string(),
|
||||
minio: Some(m),
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
use std::{fmt::Display, pin::Pin, sync::Arc};
|
||||
use tracing::info;
|
||||
use common::error::{Error, Result};
|
||||
use crate::bucket::tier_config::{TierType, TierConfig,};
|
||||
|
||||
impl TierType {
|
||||
fn decode_msg(&self/*, dc *msgp.Reader*/) -> Result<()> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
fn encode_msg(&self/*, en *msgp.Writer*/) -> Result<()> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
pub fn marshal_msg(&self, b: &[u8]) -> Result<Vec<u8>> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
pub fn unmarshal_msg(&self, bts: &[u8]) -> Result<Vec<u8>> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
pub fn msg_size() -> usize {
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
|
||||
impl TierConfig {
|
||||
fn decode_msg(&self, dc *msgp.Reader) -> Result<()> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
pub fn encode_msg(&self, en *msgp.Writer) -> Result<()> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
pub fn marshal_msg(&self, b: &[u8]) -> Result<Vec<u8>> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
pub fn unmarshal_msg(&self, bts: &[u8]) -> Result<Vec<u8>> {
|
||||
todo!();
|
||||
}
|
||||
|
||||
fn msg_size(&self) -> usize {
|
||||
todo!();
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,10 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use crate::tier::tier::TierConfigMgr;
|
||||
|
||||
impl TierConfigMgr {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use crate::client::admin_handler_utils::AdminError;
|
||||
use http::status::StatusCode;
|
||||
use tracing::warn;
|
||||
|
||||
pub const ERR_TIER_ALREADY_EXISTS: AdminError = AdminError {
|
||||
code: "XRustFSAdminTierAlreadyExists",
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use bytes::Bytes;
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::client::{
|
||||
admin_handler_utils::AdminError,
|
||||
@@ -46,7 +53,7 @@ impl WarmBackendMinIO {
|
||||
..Default::default()
|
||||
}));
|
||||
let opts = Options {
|
||||
creds: creds,
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
//transport: GLOBAL_RemoteTargetTransport,
|
||||
trailing_headers: true,
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use tracing::warn;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::client::{
|
||||
admin_handler_utils::AdminError,
|
||||
@@ -44,7 +50,7 @@ impl WarmBackendRustFS {
|
||||
..Default::default()
|
||||
}));
|
||||
let opts = Options {
|
||||
creds: creds,
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
//transport: GLOBAL_RemoteTargetTransport,
|
||||
trailing_headers: true,
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
#![allow(unused_imports)]
|
||||
#![allow(unused_variables)]
|
||||
#![allow(unused_mut)]
|
||||
#![allow(unused_assignments)]
|
||||
#![allow(unused_must_use)]
|
||||
#![allow(clippy::all)]
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
use url::Url;
|
||||
@@ -54,7 +61,7 @@ impl WarmBackendS3 {
|
||||
return Err(std::io::Error::other("no bucket name was provided"));
|
||||
}
|
||||
|
||||
let mut creds: Credentials<Static>;
|
||||
let creds: Credentials<Static>;
|
||||
|
||||
if conf.access_key != "" && conf.secret_key != "" {
|
||||
//creds = Credentials::new_static_v4(conf.access_key, conf.secret_key, "");
|
||||
@@ -69,7 +76,7 @@ impl WarmBackendS3 {
|
||||
return Err(std::io::Error::other("insufficient parameters for S3 backend authentication"));
|
||||
}
|
||||
let opts = Options {
|
||||
creds: creds,
|
||||
creds,
|
||||
secure: u.scheme() == "https",
|
||||
//transport: GLOBAL_RemoteTargetTransport,
|
||||
..Default::default()
|
||||
|
||||
Reference in New Issue
Block a user