mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
improve crate and remove log crate
This commit is contained in:
3
Cargo.lock
generated
3
Cargo.lock
generated
@@ -4012,7 +4012,6 @@ dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"jsonwebtoken",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"madmin",
|
||||
"policy",
|
||||
"rand 0.8.5",
|
||||
@@ -5845,7 +5844,6 @@ dependencies = [
|
||||
"itertools 0.14.0",
|
||||
"jsonwebtoken",
|
||||
"lazy_static",
|
||||
"log",
|
||||
"madmin",
|
||||
"rand 0.8.5",
|
||||
"regex",
|
||||
@@ -6719,7 +6717,6 @@ dependencies = [
|
||||
"chrono",
|
||||
"dioxus",
|
||||
"dirs 6.0.0",
|
||||
"futures-util",
|
||||
"hex",
|
||||
"keyring",
|
||||
"lazy_static",
|
||||
|
||||
@@ -106,6 +106,7 @@ tokio-rustls = { version = "0.26", default-features = false }
|
||||
tokio-stream = "0.1.17"
|
||||
tokio-util = { version = "0.7.13", features = ["io", "compat"] }
|
||||
tower = { version = "0.5.2", features = ["timeout"] }
|
||||
tower-http = { version = "0.6.2", features = ["cors"] }
|
||||
tracing = "0.1.41"
|
||||
tracing-error = "0.2.1"
|
||||
tracing-subscriber = { version = "0.3.19", features = ["env-filter", "time"] }
|
||||
@@ -117,13 +118,11 @@ uuid = { version = "1.15.1", features = [
|
||||
"fast-rng",
|
||||
"macro-diagnostics",
|
||||
] }
|
||||
log = "0.4.25"
|
||||
axum = "0.7.9"
|
||||
axum-server = { version = "0.6", features = ["tls-rustls"] }
|
||||
md-5 = "0.10.6"
|
||||
workers = { path = "./common/workers" }
|
||||
test-case = "3.3.1"
|
||||
zip = "2.2.3"
|
||||
snafu = "0.8.5"
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ version.workspace = true
|
||||
chrono = { workspace = true }
|
||||
dioxus = { workspace = true, features = ["router"] }
|
||||
dirs = { workspace = true }
|
||||
futures-util = { workspace = true }
|
||||
hex = { workspace = true }
|
||||
keyring = { workspace = true }
|
||||
lazy_static = { workspace = true }
|
||||
|
||||
@@ -11,7 +11,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
tokio.workspace = true
|
||||
log.workspace = true
|
||||
time = { workspace = true, features = ["serde-human-readable"] }
|
||||
serde = { workspace = true, features = ["derive", "rc"] }
|
||||
ecstore = { path = "../ecstore" }
|
||||
|
||||
@@ -6,12 +6,12 @@ use std::{
|
||||
};
|
||||
|
||||
use arc_swap::{ArcSwap, AsRaw, Guard};
|
||||
use log::warn;
|
||||
use policy::{
|
||||
auth::UserIdentity,
|
||||
policy::{Args, PolicyDoc},
|
||||
};
|
||||
use time::OffsetDateTime;
|
||||
use tracing::warn;
|
||||
|
||||
use crate::store::{GroupInfo, MappedPolicy};
|
||||
|
||||
@@ -63,7 +63,7 @@ impl Cache {
|
||||
let mut new = CacheEntity::clone(&cur);
|
||||
op(&mut new);
|
||||
|
||||
// 使用cas原子替换内容
|
||||
// 使用 cas 原子替换内容
|
||||
let prev = target.compare_and_swap(&*cur, Arc::new(new));
|
||||
let swapped = Self::ptr_eq(&*cur, &*prev);
|
||||
if swapped {
|
||||
@@ -112,8 +112,8 @@ impl CacheInner {
|
||||
// todo!()
|
||||
// }
|
||||
|
||||
// /// 如果是临时用户,返回Ok(Some(partent_name)))
|
||||
// /// 如果不是临时用户,返回Ok(None)
|
||||
// /// 如果是临时用户,返回 Ok(Some(partent_name)))
|
||||
// /// 如果不是临时用户,返回 Ok(None)
|
||||
// fn is_temp_user(&self, user_name: &str) -> crate::Result<Option<&str>> {
|
||||
// let user = self
|
||||
// .get_user(user_name)
|
||||
@@ -126,8 +126,8 @@ impl CacheInner {
|
||||
// }
|
||||
// }
|
||||
|
||||
// /// 如果是临时用户,返回Ok(Some(partent_name)))
|
||||
// /// 如果不是临时用户,返回Ok(None)
|
||||
// /// 如果是临时用户,返回 Ok(Some(partent_name)))
|
||||
// /// 如果不是临时用户,返回 Ok(None)
|
||||
// fn is_service_account(&self, user_name: &str) -> crate::Result<Option<&str>> {
|
||||
// let user = self
|
||||
// .get_user(user_name)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
use common::error::{Error, Result};
|
||||
use ecstore::store::ECStore;
|
||||
use error::Error as IamError;
|
||||
use log::debug;
|
||||
use manager::IamCache;
|
||||
use policy::auth::Credentials;
|
||||
use std::sync::{Arc, OnceLock};
|
||||
use store::object::ObjectStore;
|
||||
use sys::IamSys;
|
||||
use tracing::debug;
|
||||
|
||||
pub mod cache;
|
||||
pub mod error;
|
||||
|
||||
@@ -11,7 +11,6 @@ use crate::{
|
||||
use common::error::{Error, Result};
|
||||
use ecstore::config::error::is_err_config_not_found;
|
||||
use ecstore::utils::{crypto::base64_encode, path::path_join_buf};
|
||||
use log::{debug, warn};
|
||||
use madmin::{AccountStatus, AddOrUpdateUserReq, GroupDesc};
|
||||
use policy::{
|
||||
arn::ARN,
|
||||
@@ -40,6 +39,7 @@ use tokio::{
|
||||
},
|
||||
};
|
||||
use tracing::error;
|
||||
use tracing::{debug, warn};
|
||||
|
||||
const IAM_FORMAT_FILE: &str = "format.json";
|
||||
const IAM_FORMAT_VERSION_1: i32 = 1;
|
||||
|
||||
@@ -11,7 +11,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
tokio.workspace = true
|
||||
log.workspace = true
|
||||
time = { workspace = true, features = ["serde-human-readable"] }
|
||||
serde = { workspace = true, features = ["derive", "rc"] }
|
||||
serde_json.workspace = true
|
||||
|
||||
@@ -16,7 +16,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
madmin.workspace = true
|
||||
#log.workspace = true
|
||||
async-trait.workspace = true
|
||||
bytes.workspace = true
|
||||
clap.workspace = true
|
||||
@@ -30,7 +29,6 @@ futures.workspace = true
|
||||
futures-util.workspace = true
|
||||
h2 = "0.4.7"
|
||||
hyper.workspace = true
|
||||
#hyper-rustls.workspace = true
|
||||
hyper-util.workspace = true
|
||||
http.workspace = true
|
||||
http-body.workspace = true
|
||||
@@ -61,7 +59,7 @@ tokio = { workspace = true, features = [
|
||||
tokio-rustls.workspace = true
|
||||
lazy_static.workspace = true
|
||||
tokio-stream.workspace = true
|
||||
tonic = { version = "0.12.3", features = ["gzip"] }
|
||||
tonic.workspace = true
|
||||
tonic-reflection.workspace = true
|
||||
tower.workspace = true
|
||||
tracing-error.workspace = true
|
||||
@@ -81,7 +79,7 @@ query = { path = "../s3select/query" }
|
||||
api = { path = "../s3select/api" }
|
||||
iam = { path = "../iam" }
|
||||
jsonwebtoken = "9.3.0"
|
||||
tower-http = { version = "0.6.2", features = ["cors"] }
|
||||
tower-http.workspace = true
|
||||
mime_guess = "2.0.5"
|
||||
rust-embed = { workspace = true, features = ["interpolate-folder-path"] }
|
||||
local-ip-address = { workspace = true }
|
||||
|
||||
Reference in New Issue
Block a user