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