mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 16:37:07 +00:00
Remove unused crate
This commit is contained in:
Generated
-24
@@ -7179,7 +7179,6 @@ dependencies = [
|
|||||||
"common",
|
"common",
|
||||||
"const-str",
|
"const-str",
|
||||||
"crypto",
|
"crypto",
|
||||||
"csv",
|
|
||||||
"datafusion",
|
"datafusion",
|
||||||
"ecstore",
|
"ecstore",
|
||||||
"flatbuffers",
|
"flatbuffers",
|
||||||
@@ -7190,7 +7189,6 @@ dependencies = [
|
|||||||
"hyper",
|
"hyper",
|
||||||
"hyper-util",
|
"hyper-util",
|
||||||
"iam",
|
"iam",
|
||||||
"jsonwebtoken",
|
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libsystemd",
|
"libsystemd",
|
||||||
"local-ip-address",
|
"local-ip-address",
|
||||||
@@ -7200,13 +7198,9 @@ dependencies = [
|
|||||||
"mime",
|
"mime",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
"netif",
|
"netif",
|
||||||
"once_cell",
|
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"policy",
|
"policy",
|
||||||
"prost",
|
|
||||||
"prost-build",
|
"prost-build",
|
||||||
"prost-types",
|
|
||||||
"protobuf 3.7.2",
|
|
||||||
"protos",
|
"protos",
|
||||||
"query",
|
"query",
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
@@ -7227,15 +7221,10 @@ dependencies = [
|
|||||||
"tokio-util",
|
"tokio-util",
|
||||||
"tonic 0.13.0",
|
"tonic 0.13.0",
|
||||||
"tonic-build",
|
"tonic-build",
|
||||||
"tonic-reflection",
|
|
||||||
"tower 0.5.2",
|
"tower 0.5.2",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-core",
|
|
||||||
"tracing-error",
|
|
||||||
"tracing-subscriber",
|
|
||||||
"transform-stream",
|
"transform-stream",
|
||||||
"url",
|
|
||||||
"uuid",
|
"uuid",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -8594,19 +8583,6 @@ dependencies = [
|
|||||||
"syn 2.0.100",
|
"syn 2.0.100",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tonic-reflection"
|
|
||||||
version = "0.13.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "88fa815be858816dad226a49439ee90b7bcf81ab55bee72fdb217f1e6778c3ca"
|
|
||||||
dependencies = [
|
|
||||||
"prost",
|
|
||||||
"prost-types",
|
|
||||||
"tokio",
|
|
||||||
"tokio-stream",
|
|
||||||
"tonic 0.13.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tower"
|
name = "tower"
|
||||||
version = "0.4.13"
|
version = "0.4.13"
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ matchit = "0.8.4"
|
|||||||
md-5 = "0.10.6"
|
md-5 = "0.10.6"
|
||||||
mime = "0.3.17"
|
mime = "0.3.17"
|
||||||
netif = "0.1.6"
|
netif = "0.1.6"
|
||||||
once_cell = "1.21.1"
|
|
||||||
opentelemetry = { version = "0.29.1" }
|
opentelemetry = { version = "0.29.1" }
|
||||||
opentelemetry-appender-tracing = { version = "0.29.1", features = ["experimental_use_tracing_span_context", "experimental_metadata_attributes"] }
|
opentelemetry-appender-tracing = { version = "0.29.1", features = ["experimental_use_tracing_span_context", "experimental_metadata_attributes"] }
|
||||||
opentelemetry_sdk = { version = "0.29" }
|
opentelemetry_sdk = { version = "0.29" }
|
||||||
@@ -123,7 +122,6 @@ time = { version = "0.3.41", features = [
|
|||||||
tokio = { version = "1.44.2", features = ["fs", "rt-multi-thread"] }
|
tokio = { version = "1.44.2", features = ["fs", "rt-multi-thread"] }
|
||||||
tonic = { version = "0.13.0", features = ["gzip"] }
|
tonic = { version = "0.13.0", features = ["gzip"] }
|
||||||
tonic-build = "0.13.0"
|
tonic-build = "0.13.0"
|
||||||
tonic-reflection = "0.13.0"
|
|
||||||
tokio-rustls = { version = "0.26", default-features = false }
|
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"] }
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ impl Default for FileSinkConfig {
|
|||||||
path: env::var("RUSTFS_SINKS_FILE_PATH")
|
path: env::var("RUSTFS_SINKS_FILE_PATH")
|
||||||
.ok()
|
.ok()
|
||||||
.filter(|s| !s.trim().is_empty())
|
.filter(|s| !s.trim().is_empty())
|
||||||
.unwrap_or_else(|| Self::get_default_log_path()),
|
.unwrap_or_else(Self::get_default_log_path),
|
||||||
buffer_size: Some(8192),
|
buffer_size: Some(8192),
|
||||||
flush_interval_ms: Some(1000),
|
flush_interval_ms: Some(1000),
|
||||||
flush_threshold: Some(100),
|
flush_threshold: Some(100),
|
||||||
@@ -244,7 +244,7 @@ pub fn load_config(config_dir: Option<String>) -> AppConfig {
|
|||||||
// Log using proper logging instead of println when possible
|
// Log using proper logging instead of println when possible
|
||||||
println!("Using config file base: {}", config_dir);
|
println!("Using config file base: {}", config_dir);
|
||||||
|
|
||||||
let config = Config::builder()
|
let app_config = Config::builder()
|
||||||
.add_source(File::with_name(config_dir.as_str()).format(FileFormat::Toml).required(false))
|
.add_source(File::with_name(config_dir.as_str()).format(FileFormat::Toml).required(false))
|
||||||
.add_source(File::with_name(config_dir.as_str()).format(FileFormat::Yaml).required(false))
|
.add_source(File::with_name(config_dir.as_str()).format(FileFormat::Yaml).required(false))
|
||||||
.add_source(
|
.add_source(
|
||||||
@@ -258,7 +258,7 @@ pub fn load_config(config_dir: Option<String>) -> AppConfig {
|
|||||||
.build()
|
.build()
|
||||||
.unwrap_or_default();
|
.unwrap_or_default();
|
||||||
|
|
||||||
match config.try_deserialize::<AppConfig>() {
|
match app_config.try_deserialize::<AppConfig>() {
|
||||||
Ok(app_config) => {
|
Ok(app_config) => {
|
||||||
println!("Parsed AppConfig: {:?}", app_config);
|
println!("Parsed AppConfig: {:?}", app_config);
|
||||||
app_config
|
app_config
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ async-trait.workspace = true
|
|||||||
bytes.workspace = true
|
bytes.workspace = true
|
||||||
chrono = { workspace = true }
|
chrono = { workspace = true }
|
||||||
clap.workspace = true
|
clap.workspace = true
|
||||||
csv = "1.3.1"
|
|
||||||
crypto = { path = "../crypto" }
|
crypto = { path = "../crypto" }
|
||||||
datafusion = { workspace = true }
|
datafusion = { workspace = true }
|
||||||
common.workspace = true
|
common.workspace = true
|
||||||
@@ -37,26 +36,18 @@ policy.workspace = true
|
|||||||
flatbuffers.workspace = true
|
flatbuffers.workspace = true
|
||||||
futures.workspace = true
|
futures.workspace = true
|
||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
#h2 = "0.4.7"
|
|
||||||
hyper.workspace = true
|
hyper.workspace = true
|
||||||
hyper-util.workspace = true
|
hyper-util.workspace = true
|
||||||
http.workspace = true
|
http.workspace = true
|
||||||
http-body.workspace = true
|
http-body.workspace = true
|
||||||
iam = { path = "../iam" }
|
iam = { path = "../iam" }
|
||||||
jsonwebtoken = "9.3.0"
|
|
||||||
|
|
||||||
lock.workspace = true
|
lock.workspace = true
|
||||||
local-ip-address = { workspace = true }
|
local-ip-address = { workspace = true }
|
||||||
matchit = { workspace = true }
|
matchit = { workspace = true }
|
||||||
mime.workspace = true
|
mime.workspace = true
|
||||||
mime_guess = "2.0.5"
|
mime_guess = "2.0.5"
|
||||||
netif.workspace = true
|
|
||||||
once_cell.workspace = true
|
|
||||||
pin-project-lite.workspace = true
|
pin-project-lite.workspace = true
|
||||||
prost.workspace = true
|
|
||||||
prost-types.workspace = true
|
|
||||||
protos.workspace = true
|
protos.workspace = true
|
||||||
protobuf.workspace = true
|
|
||||||
query = { path = "../s3select/query" }
|
query = { path = "../s3select/query" }
|
||||||
rmp-serde.workspace = true
|
rmp-serde.workspace = true
|
||||||
rustfs-obs = { workspace = true }
|
rustfs-obs = { workspace = true }
|
||||||
@@ -82,14 +73,9 @@ tokio-rustls.workspace = true
|
|||||||
lazy_static.workspace = true
|
lazy_static.workspace = true
|
||||||
tokio-stream.workspace = true
|
tokio-stream.workspace = true
|
||||||
tonic = { workspace = true }
|
tonic = { workspace = true }
|
||||||
tonic-reflection.workspace = true
|
|
||||||
tower.workspace = true
|
tower.workspace = true
|
||||||
tracing-core = { workspace = true }
|
|
||||||
tracing-error.workspace = true
|
|
||||||
tracing-subscriber.workspace = true
|
|
||||||
transform-stream.workspace = true
|
transform-stream.workspace = true
|
||||||
tower-http.workspace = true
|
tower-http.workspace = true
|
||||||
url.workspace = true
|
|
||||||
uuid = "1.15.1"
|
uuid = "1.15.1"
|
||||||
|
|
||||||
[target.'cfg(target_os = "linux")'.dependencies]
|
[target.'cfg(target_os = "linux")'.dependencies]
|
||||||
@@ -106,7 +92,6 @@ futures-util.workspace = true
|
|||||||
ecstore = { path = "../ecstore" }
|
ecstore = { path = "../ecstore" }
|
||||||
s3s.workspace = true
|
s3s.workspace = true
|
||||||
clap = { workspace = true }
|
clap = { workspace = true }
|
||||||
tracing-subscriber = { workspace = true, features = ["env-filter", "time"] }
|
|
||||||
hyper-util = { workspace = true, features = [
|
hyper-util = { workspace = true, features = [
|
||||||
"tokio",
|
"tokio",
|
||||||
"server-auto",
|
"server-auto",
|
||||||
|
|||||||
+2
-25
@@ -45,37 +45,14 @@ use rustfs_obs::{init_obs, load_config, set_global_guard, InitLogStatus};
|
|||||||
use rustls::ServerConfig;
|
use rustls::ServerConfig;
|
||||||
use s3s::{host::MultiDomain, service::S3ServiceBuilder};
|
use s3s::{host::MultiDomain, service::S3ServiceBuilder};
|
||||||
use service::hybrid;
|
use service::hybrid;
|
||||||
|
use std::net::SocketAddr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
|
||||||
use std::{io::IsTerminal, net::SocketAddr};
|
|
||||||
use tokio::net::TcpListener;
|
use tokio::net::TcpListener;
|
||||||
use tokio::signal::unix::{signal, SignalKind};
|
use tokio::signal::unix::{signal, SignalKind};
|
||||||
use tokio_rustls::TlsAcceptor;
|
use tokio_rustls::TlsAcceptor;
|
||||||
use tonic::{metadata::MetadataValue, Request, Status};
|
use tonic::{metadata::MetadataValue, Request, Status};
|
||||||
use tower_http::cors::CorsLayer;
|
use tower_http::cors::CorsLayer;
|
||||||
use tracing::log::warn;
|
use tracing::{debug, error, info, info_span, warn};
|
||||||
use tracing::{debug, error, info, info_span};
|
|
||||||
use tracing_error::ErrorLayer;
|
|
||||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn setup_tracing() {
|
|
||||||
use tracing_subscriber::EnvFilter;
|
|
||||||
|
|
||||||
let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info"));
|
|
||||||
let enable_color = std::io::stdout().is_terminal();
|
|
||||||
|
|
||||||
let subscriber = tracing_subscriber::fmt::fmt()
|
|
||||||
.pretty()
|
|
||||||
.with_env_filter(env_filter)
|
|
||||||
.with_ansi(enable_color)
|
|
||||||
.with_file(true)
|
|
||||||
.with_line_number(true)
|
|
||||||
.finish()
|
|
||||||
.with(ErrorLayer::default());
|
|
||||||
|
|
||||||
subscriber.try_init().expect("failed to set global default subscriber");
|
|
||||||
}
|
|
||||||
|
|
||||||
fn check_auth(req: Request<()>) -> Result<Request<()>, Status> {
|
fn check_auth(req: Request<()>) -> Result<Request<()>, Status> {
|
||||||
let token: MetadataValue<_> = "rustfs rpc".parse().unwrap();
|
let token: MetadataValue<_> = "rustfs rpc".parse().unwrap();
|
||||||
|
|||||||
Reference in New Issue
Block a user