refactor: narrow startup and ecstore root facades (#3679)

* refactor: narrow startup owner visibility

* refactor: prune remaining ecstore root facades
This commit is contained in:
安正超
2026-06-21 09:42:15 +08:00
committed by GitHub
parent 0985225448
commit d4150117c3
26 changed files with 213 additions and 109 deletions
+23
View File
@@ -18,6 +18,10 @@ pub mod admin {
pub use crate::admin_server_info::{get_local_server_property, get_server_info};
}
pub mod bitrot {
pub use crate::bitrot::{create_bitrot_reader, create_bitrot_writer};
}
pub mod bucket {
pub use crate::bucket::{
bandwidth, bucket_target_sys, lifecycle, metadata, metadata_sys, migration, object_lock, policy_sys, quota, replication,
@@ -78,7 +82,15 @@ pub mod error {
};
}
pub mod erasure {
pub use crate::erasure_coding::{
BitrotReader, BitrotWriter, BitrotWriterWrapper, CustomWriter, Erasure, ReedSolomonEncoder, calc_shard_size,
calc_shard_size_legacy,
};
}
pub mod event {
pub use crate::event::name::EventName;
pub use crate::event_notification::{EventArgs, register_event_dispatch_hook};
}
@@ -107,6 +119,13 @@ pub mod notification {
};
}
pub mod object {
pub use crate::object_api::{
BLOCK_SIZE_V2, ERASURE_ALGORITHM, GetObjectReader, ObjectInfo, ObjectOptions, PutObjReader, RangedDecompressReader,
StreamConsumer,
};
}
pub mod rebalance {
pub use crate::rebalance::{
DiskStat, RebalSaveOpt, RebalStatus, RebalanceCleanupWarnings, RebalanceInfo, RebalanceMeta, RebalanceStats,
@@ -132,6 +151,10 @@ pub mod set_disk {
pub use crate::set_disk::{DEFAULT_READ_BUFFER_SIZE, SetDisks, get_lock_acquire_timeout, is_valid_storage_class};
}
pub mod store_list {
pub use crate::store_list_objects::{ListPathOptions, max_keys_plus_one};
}
pub mod storage {
pub use crate::store::{
ECStore, all_local_disk, all_local_disk_path, find_local_disk_by_ref, init_local_disks, init_lock_clients,
+1 -1
View File
@@ -368,7 +368,7 @@ fn recover_empty_payload_data_shards(
///
/// # Example
/// ```ignore
/// use rustfs_ecstore::erasure_coding::Erasure;
/// use rustfs_ecstore::api::erasure::Erasure;
/// let erasure = Erasure::new(4, 2, 8);
/// let data = b"hello world";
/// let shards = erasure.encode_data(data).unwrap();
+1 -1
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//! Compatibility re-export for the legacy `rustfs_ecstore::event::name::EventName` path.
//! Compatibility re-export for the ECStore event facade.
//! The canonical event definition now lives in `rustfs_s3_types::EventName`.
pub use rustfs_s3_types::EventName;
+6 -6
View File
@@ -17,8 +17,8 @@ extern crate core;
mod admin_server_info;
pub mod api;
pub mod batch_processor;
pub mod bitrot;
mod batch_processor;
mod bitrot;
mod bucket;
mod cache_value;
mod compress;
@@ -28,13 +28,13 @@ mod data_usage;
mod disk;
mod disks_layout;
mod endpoints;
pub mod erasure_coding;
mod erasure_coding;
mod error;
mod global;
pub(crate) mod layout;
mod metrics_realtime;
mod notification_sys;
pub mod object_api;
mod object_api;
mod pools;
mod rebalance;
mod rio;
@@ -44,12 +44,12 @@ mod sets;
mod storage_api_contracts;
mod store;
mod store_init;
pub mod store_list_objects;
mod store_list_objects;
mod store_utils;
// pub mod checksum;
mod client;
pub mod event;
mod event;
mod event_notification;
#[cfg(test)]
mod pools_test;