mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-17 18:27:49 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user