mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-19 11:06:17 +00:00
refactor: narrow remaining local compat exports (#3713)
This commit is contained in:
@@ -12,4 +12,79 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub(crate) use crate::admin::storage_compat::*;
|
||||
pub(crate) use crate::admin::storage_compat::{
|
||||
AdminError, AdminReplicationConfigExt, AdminVersioningConfigExt, CollectMetricsOpts, DailyAllTierStats, DiskStat, ECStore,
|
||||
ERR_TIER_ALREADY_EXISTS, ERR_TIER_BACKEND_IN_USE, ERR_TIER_BACKEND_NOT_EMPTY, ERR_TIER_CONNECT_ERR,
|
||||
ERR_TIER_INVALID_CREDENTIALS, ERR_TIER_MISSING_CREDENTIALS, ERR_TIER_NAME_NOT_UPPERCASE, ERR_TIER_NOT_FOUND,
|
||||
EndpointServerPools, Error, MetricType, PeerRestClient, RUSTFS_META_BUCKET, RebalSaveOpt, RebalanceCleanupWarnings,
|
||||
RebalanceMeta, RebalanceStats, STORAGE_CLASS_SUB_SYS, StorageError, TierConfig, TierCreds, TierType, collect_local_metrics,
|
||||
delete_admin_config, get_global_deployment_id, get_global_endpoints_opt, get_global_notification_sys, get_global_region,
|
||||
global_rustfs_port, init_admin_config_defaults, is_reserved_or_invalid_bucket, load_data_usage_from_backend,
|
||||
read_admin_config, read_admin_config_without_migrate, save_admin_config, save_admin_server_config,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::admin::storage_compat::{Endpoint, Endpoints, PoolEndpoints, RebalStatus, RebalanceInfo};
|
||||
|
||||
pub(crate) mod bucket_target_sys {
|
||||
pub(crate) use crate::admin::storage_compat::bucket_target_sys::{BucketTargetError, BucketTargetSys};
|
||||
}
|
||||
|
||||
pub(crate) mod lifecycle {
|
||||
pub(crate) mod bucket_lifecycle_ops {
|
||||
pub(crate) use crate::admin::storage_compat::lifecycle::bucket_lifecycle_ops::GLOBAL_TransitionState;
|
||||
}
|
||||
|
||||
pub(crate) mod tier_last_day_stats {
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::admin::storage_compat::lifecycle::tier_last_day_stats::LastDayTierStats;
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod metadata {
|
||||
pub(crate) use crate::admin::storage_compat::metadata::{
|
||||
BUCKET_CORS_CONFIG, BUCKET_LIFECYCLE_CONFIG, BUCKET_NOTIFICATION_CONFIG, BUCKET_POLICY_CONFIG, BUCKET_QUOTA_CONFIG_FILE,
|
||||
BUCKET_REPLICATION_CONFIG, BUCKET_SSECONFIG, BUCKET_TAGGING_CONFIG, BUCKET_TARGETS_FILE, BUCKET_VERSIONING_CONFIG,
|
||||
BucketMetadata, OBJECT_LOCK_CONFIG, table_catalog_path_hash,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod metadata_sys {
|
||||
pub(crate) use crate::admin::storage_compat::metadata_sys::{
|
||||
BucketMetadataSys, delete, get, get_bucket_policy, get_bucket_targets_config, get_config_from_disk, get_lifecycle_config,
|
||||
get_notification_config, get_object_lock_config, get_quota_config, get_replication_config, get_sse_config,
|
||||
get_tagging_config, get_versioning_config, list_bucket_targets, update,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod quota {
|
||||
pub(crate) use crate::admin::storage_compat::quota::{BucketQuota, QuotaError, QuotaOperation};
|
||||
|
||||
pub(crate) mod checker {
|
||||
pub(crate) use crate::admin::storage_compat::quota::checker::QuotaChecker;
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod replication {
|
||||
pub(crate) use crate::admin::storage_compat::replication::{
|
||||
BucketStats, GLOBAL_REPLICATION_STATS, ResyncOpts, get_global_replication_pool,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod storageclass {
|
||||
pub(crate) use crate::admin::storage_compat::storageclass::{
|
||||
INLINE_BLOCK_ENV, OPTIMIZE_ENV, RRS, RRS_ENV, STANDARD, STANDARD_ENV,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod target {
|
||||
pub(crate) use crate::admin::storage_compat::target::{ARN, BucketTarget, BucketTargetType, BucketTargets, Credentials};
|
||||
}
|
||||
|
||||
pub(crate) mod utils {
|
||||
pub(crate) use crate::admin::storage_compat::utils::{deserialize, is_valid_object_prefix, serialize};
|
||||
}
|
||||
|
||||
pub(crate) mod versioning_sys {
|
||||
pub(crate) use crate::admin::storage_compat::versioning_sys::BucketVersioningSys;
|
||||
}
|
||||
|
||||
@@ -12,4 +12,148 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
pub(crate) use crate::app::storage_compat::*;
|
||||
pub(crate) use crate::app::storage_compat::{
|
||||
AppObjectLockConfigExt, AppReplicationConfigExt, AppVersioningConfigExt, DiskError, DynReader, ECStore, EndpointServerPools,
|
||||
Error, HashReader, MIN_DISK_COMPRESSIBLE_SIZE, PoolDecommissionInfo, PoolStatus, StorageError, WriteEncryption, WritePlan,
|
||||
apply_bucket_usage_memory_overlay, compression_metadata_value, get_global_notification_sys, get_lock_acquire_timeout,
|
||||
get_server_info, get_total_usable_capacity, get_total_usable_capacity_free, is_all_buckets_not_found, is_disk_compressible,
|
||||
is_err_bucket_not_found, is_err_object_not_found, is_err_version_not_found, is_valid_storage_class,
|
||||
load_data_usage_from_backend, predict_lifecycle_expiration, record_bucket_object_delete_memory,
|
||||
record_bucket_object_write_memory, validate_restore_request, wrap_reader,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::{
|
||||
AppWarmBackend, DecryptReader, EncryptReader, Endpoint, Endpoints, GLOBAL_TierConfigMgr, HardLimitReader, PoolEndpoints,
|
||||
TierConfig, TierType, WarmBackendGetOpts, boxed_reader, init_local_disks,
|
||||
};
|
||||
|
||||
pub(crate) mod bucket_target_sys {
|
||||
pub(crate) use crate::app::storage_compat::bucket_target_sys::BucketTargetSys;
|
||||
}
|
||||
|
||||
pub(crate) mod lifecycle {
|
||||
pub(crate) mod bucket_lifecycle_audit {
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::bucket_lifecycle_audit::LcEventSrc;
|
||||
}
|
||||
|
||||
pub(crate) mod bucket_lifecycle_ops {
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::bucket_lifecycle_ops::{
|
||||
GLOBAL_ExpiryState, enqueue_expiry_for_existing_objects, enqueue_transition_for_existing_objects,
|
||||
enqueue_transition_immediate, post_restore_opts, validate_lifecycle_config, validate_transition_tier,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::bucket_lifecycle_ops::init_background_expiry;
|
||||
}
|
||||
|
||||
pub(crate) mod lifecycle_contract {
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::lifecycle::{
|
||||
Event, ObjectOpts, TRANSITION_COMPLETE, TransitionOptions, expected_expiry_time,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::lifecycle::IlmAction;
|
||||
}
|
||||
pub(crate) use lifecycle_contract as lifecycle;
|
||||
|
||||
pub(crate) mod tier_delete_journal {
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::tier_delete_journal::persist_tier_delete_journal_entry;
|
||||
}
|
||||
|
||||
pub(crate) mod tier_sweeper {
|
||||
pub(crate) use crate::app::storage_compat::lifecycle::tier_sweeper::{
|
||||
transitioned_delete_journal_entry, transitioned_force_delete_journal_entry,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod metadata {
|
||||
pub(crate) use crate::app::storage_compat::metadata::{
|
||||
BUCKET_CORS_CONFIG, BUCKET_LIFECYCLE_CONFIG, BUCKET_NOTIFICATION_CONFIG, BUCKET_POLICY_CONFIG,
|
||||
BUCKET_PUBLIC_ACCESS_BLOCK_CONFIG, BUCKET_REPLICATION_CONFIG, BUCKET_SSECONFIG, BUCKET_TAGGING_CONFIG,
|
||||
BUCKET_TARGETS_FILE, BUCKET_VERSIONING_CONFIG,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::metadata::OBJECT_LOCK_CONFIG;
|
||||
}
|
||||
|
||||
pub(crate) mod metadata_sys {
|
||||
pub(crate) use crate::app::storage_compat::metadata_sys::{
|
||||
BucketMetadataSys, delete, get_bucket_policy, get_bucket_policy_raw, get_bucket_targets_config, get_cors_config,
|
||||
get_lifecycle_config, get_notification_config, get_object_lock_config, get_public_access_block_config,
|
||||
get_replication_config, get_sse_config, get_tagging_config, update,
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::metadata_sys::init_bucket_metadata_sys;
|
||||
}
|
||||
|
||||
pub(crate) mod object_api_utils {
|
||||
pub(crate) use crate::app::storage_compat::object_api_utils::to_s3s_etag;
|
||||
}
|
||||
|
||||
pub(crate) mod object_lock {
|
||||
pub(crate) mod objectlock {
|
||||
pub(crate) use crate::app::storage_compat::object_lock::objectlock::{
|
||||
get_object_legalhold_meta, get_object_retention_meta,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod objectlock_sys {
|
||||
pub(crate) use crate::app::storage_compat::object_lock::objectlock_sys::{
|
||||
BucketObjectLockSys, check_object_lock_for_deletion, is_retention_active,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod policy_sys {
|
||||
pub(crate) use crate::app::storage_compat::policy_sys::PolicySys;
|
||||
}
|
||||
|
||||
pub(crate) mod quota {
|
||||
pub(crate) use crate::app::storage_compat::quota::QuotaOperation;
|
||||
|
||||
pub(crate) mod checker {
|
||||
pub(crate) use crate::app::storage_compat::quota::checker::QuotaChecker;
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) mod replication {
|
||||
pub(crate) use crate::app::storage_compat::replication::{
|
||||
DeletedObjectReplicationInfo, ObjectOpts, check_replicate_delete, get_must_replicate_options, must_replicate,
|
||||
schedule_replication, schedule_replication_delete,
|
||||
};
|
||||
}
|
||||
|
||||
pub(crate) mod storageclass {
|
||||
pub(crate) use crate::app::storage_compat::storageclass::STANDARD;
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::storageclass::STANDARD_IA;
|
||||
}
|
||||
|
||||
pub(crate) mod tagging {
|
||||
pub(crate) use crate::app::storage_compat::tagging::decode_tags;
|
||||
}
|
||||
|
||||
pub(crate) mod target {
|
||||
pub(crate) use crate::app::storage_compat::target::{BucketTargetType, BucketTargets};
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) use crate::app::storage_compat::target::BucketTarget;
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod transition_api {
|
||||
pub(crate) use crate::app::storage_compat::transition_api::{ReadCloser, ReaderImpl};
|
||||
}
|
||||
|
||||
pub(crate) mod utils {
|
||||
pub(crate) use crate::app::storage_compat::utils::serialize;
|
||||
}
|
||||
|
||||
pub(crate) mod versioning_sys {
|
||||
pub(crate) use crate::app::storage_compat::versioning_sys::BucketVersioningSys;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user