mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-05 21:07:43 +00:00
96d22c3276
Move the construction of the hybrid service stack, including all middleware and the RPC service, from the main `run` function into the `process_connection` function. This change ensures that each incoming connection gets its own isolated service instance. This improves modularity by making the connection handling logic more self-contained and simplifies the main server loop. Key changes: - The `hybrid_service` and `rpc_service` are now created inside `process_connection`. - The `run` function's responsibility is reduced to accepting TCP connections and spawning tasks for `process_connection`.
45 lines
1.3 KiB
TOML
45 lines
1.3 KiB
TOML
# Copyright 2024 RustFS Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
[package]
|
|
name = "rustfs-rio"
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
tokio = { workspace = true, features = ["full"] }
|
|
rand = { workspace = true }
|
|
http.workspace = true
|
|
aes-gcm = { workspace = true }
|
|
crc32fast = { workspace = true }
|
|
pin-project-lite.workspace = true
|
|
serde = { workspace = true }
|
|
bytes.workspace = true
|
|
reqwest.workspace = true
|
|
tokio-util.workspace = true
|
|
futures.workspace = true
|
|
rustfs-utils = { workspace = true, features = ["io", "hash", "compress"] }
|
|
serde_json.workspace = true
|
|
md-5 = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
#criterion = { version = "0.5.1", features = ["async", "async_tokio", "tokio"] }
|
|
tokio-test = "0.4"
|