refactor(rustfs): move layer-neutral shared types out of server (#6061)

RemoteAddr, the DependencyReadiness family (DependencyReadiness, ReadinessDegradedReason, DependencyReadinessReport), and convert_ecstore_object_info (with its offset_date_time_to_timestamp helper) are consumed across app, infra, and interface layers but lived under server, so every lower-layer import was an upward app->interface or infra->interface edge the layer guard had to baseline.

They now live in a new layer-neutral rustfs/src/shared_types.rs (classified infra by the guard, making all consumer imports downward or lateral). server::readiness and server::event re-export for their own internals; the eight consumer sites (admin_usecase, bucket_usecase, object_usecase, cluster_snapshot, storage/access, storage/helper, plus the admin handler tests) import from the new home. Pure move: no type, impl, or behavior change.

The regenerated layer-dependency baseline shrinks by exactly eight lines with zero additions — the ratchet's intended direction. The two remaining readiness entries (collect/snapshot fn imports) need the collection machinery itself extracted from server and are left for the issue's PR5 scope.

Ref rustfs/backlog#1834 (PR4).
This commit is contained in:
Zhengchao An
2026-08-13 12:29:49 +08:00
committed by GitHub
parent e28430ab3d
commit e4da9bd718
14 changed files with 138 additions and 119 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ use crate::app::runtime_sources::{
use crate::config::RustFSBufferConfig;
use crate::delete_tail_activity::{DeleteTailActivityGuard, DeleteTailStage};
use crate::error::ApiError;
use crate::server::convert_ecstore_object_info;
use crate::shared_types::convert_ecstore_object_info;
use crate::table_catalog;
use bytes::{Bytes, BytesMut};
use futures::{Stream, StreamExt, TryStreamExt};