refactor: standardize constant management and fix typos (#387)

* init rustfs config

* init rustfs-utils crate

* improve code for rustfs-config crate

* add

* improve code for comment

* init rustfs config

* improve code for rustfs-config crate

* add

* improve code for comment

* Unified management of configurations and constants

* fix: modify rustfs-config crate name

* add default fn

* improve code for rustfs config

* refactor: standardize constant management and fix typos

- Create centralized constants module for global static constants
- Replace runtime format! expressions with compile-time constants
- Fix DEFAULT_PORT reference issues in configuration arguments
- Use const-str crate for compile-time string concatenation
- Update tokio dependency from 1.42.2 to 1.45.0
- Ensure consistent naming convention for configuration constants

* fix

* Update common/workers/src/workers.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
houseme
2025-05-07 17:23:22 +08:00
committed by GitHub
parent de275b0510
commit 29ddf4dbc8
38 changed files with 637 additions and 205 deletions
Generated
+27 -5
View File
@@ -3107,6 +3107,7 @@ dependencies = [
"reqwest",
"rmp",
"rmp-serde",
"rustfs-config",
"s3s",
"s3s-policy",
"serde",
@@ -7258,7 +7259,6 @@ dependencies = [
"iam",
"lazy_static",
"libsystemd",
"local-ip-address",
"lock",
"madmin",
"matchit",
@@ -7273,11 +7273,11 @@ dependencies = [
"query",
"rmp-serde",
"rust-embed",
"rustfs-config",
"rustfs-event-notifier",
"rustfs-obs",
"rustfs-utils",
"rustls 0.23.27",
"rustls-pemfile",
"rustls-pki-types",
"s3s",
"serde",
"serde_json",
@@ -7299,6 +7299,16 @@ dependencies = [
"uuid",
]
[[package]]
name = "rustfs-config"
version = "0.0.1"
dependencies = [
"config",
"const-str",
"serde",
"serde_json",
]
[[package]]
name = "rustfs-event-notifier"
version = "0.0.1"
@@ -7373,6 +7383,18 @@ dependencies = [
"tracing-subscriber",
]
[[package]]
name = "rustfs-utils"
version = "0.0.1"
dependencies = [
"local-ip-address",
"rustfs-config",
"rustls 0.23.27",
"rustls-pemfile",
"rustls-pki-types",
"tracing",
]
[[package]]
name = "rustix"
version = "0.38.44"
@@ -8611,9 +8633,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.44.2"
version = "1.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48"
checksum = "2513ca694ef9ede0fb23fe71a4ee4107cb102b9dc1930f6d0fd77aae068ae165"
dependencies = [
"backtrace",
"bytes",