refactor: narrow IAM and Swift compatibility surfaces (#3587)

* refactor: narrow IAM and Swift compatibility surfaces

* refactor: narrow heal and scanner compatibility surfaces (#3588)

* refactor: narrow RustFS runtime compatibility surfaces (#3591)
This commit is contained in:
安正超
2026-06-19 03:06:57 +08:00
committed by GitHub
parent 9b1272529a
commit b14e49e84e
15 changed files with 696 additions and 271 deletions
+10 -14
View File
@@ -12,29 +12,25 @@
// See the License for the specific language governing permissions and
// limitations under the License.
mod ecstore {
pub(super) use rustfs_ecstore::{bucket, error, resolve_object_store_handle, store};
}
use self::ecstore::{
bucket::{metadata::BucketMetadata, metadata_sys},
error::Result as EcstoreResult,
store::ECStore,
};
use std::sync::Arc;
pub(super) type SwiftBucketMetadata = rustfs_ecstore::bucket::metadata::BucketMetadata;
pub(super) type SwiftStorageResult<T> = rustfs_ecstore::error::Result<T>;
pub(super) type SwiftStore = rustfs_ecstore::store::ECStore;
pub type SwiftGetObjectReader = rustfs_ecstore::store_api::GetObjectReader;
pub type SwiftObjectInfo = rustfs_ecstore::store_api::ObjectInfo;
pub type SwiftObjectOptions = rustfs_ecstore::store_api::ObjectOptions;
pub type SwiftPutObjReader = rustfs_ecstore::store_api::PutObjReader;
pub fn resolve_swift_object_store_handle() -> Option<Arc<ECStore>> {
ecstore::resolve_object_store_handle()
pub fn resolve_swift_object_store_handle() -> Option<Arc<SwiftStore>> {
rustfs_ecstore::resolve_object_store_handle()
}
pub async fn get_swift_bucket_metadata(bucket: &str) -> EcstoreResult<Arc<BucketMetadata>> {
metadata_sys::get(bucket).await
pub async fn get_swift_bucket_metadata(bucket: &str) -> SwiftStorageResult<Arc<SwiftBucketMetadata>> {
rustfs_ecstore::bucket::metadata_sys::get(bucket).await
}
pub async fn set_swift_bucket_metadata(bucket: String, metadata: BucketMetadata) -> EcstoreResult<()> {
metadata_sys::set_bucket_metadata(bucket, metadata).await
pub async fn set_swift_bucket_metadata(bucket: String, metadata: SwiftBucketMetadata) -> SwiftStorageResult<()> {
rustfs_ecstore::bucket::metadata_sys::set_bucket_metadata(bucket, metadata).await
}