34 lines
1.4 KiB
Rust
34 lines
1.4 KiB
Rust
// Copyright 2024 RustFS Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
#[cfg(test)]
|
|
use rustfs_ecstore::api::disk as ecstore_disk;
|
|
use rustfs_ecstore::api::{cluster as ecstore_cluster, layout as ecstore_layout};
|
|
|
|
#[cfg(test)]
|
|
pub(crate) type Endpoint = ecstore_disk::endpoint::Endpoint;
|
|
pub(crate) type EndpointServerPools = ecstore_layout::EndpointServerPools;
|
|
#[cfg(test)]
|
|
pub(crate) type Endpoints = ecstore_layout::Endpoints;
|
|
#[cfg(test)]
|
|
pub(crate) type PoolEndpoints = ecstore_layout::PoolEndpoints;
|
|
|
|
pub(crate) fn topology_snapshot_from_endpoint_pools_with_capabilities(
|
|
endpoint_pools: &EndpointServerPools,
|
|
capabilities: rustfs_storage_api::TopologyCapabilities,
|
|
disk_capabilities: rustfs_storage_api::DiskCapabilities,
|
|
) -> rustfs_storage_api::TopologySnapshot {
|
|
ecstore_cluster::topology_snapshot_from_endpoint_pools_with_capabilities(endpoint_pools, capabilities, disk_capabilities)
|
|
}
|