mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-27 15:37:02 +00:00
refactor: centralize external ECStore facade aliases (#3746)
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use async_trait::async_trait;
|
||||
use rustfs_ecstore::api::rpc::{self as ecstore_rpc, TonicInterceptor};
|
||||
use rustfs_ecstore::api::rpc as ecstore_rpc;
|
||||
use rustfs_lock::{
|
||||
LockClient, LockError, LockId, LockInfo, LockRequest, LockResponse, LockStats, LockStatus, LockType, Result,
|
||||
types::{LockMetadata, LockPriority},
|
||||
@@ -25,6 +25,8 @@ use rustfs_protos::proto_gen::node_service::{BatchGenerallyLockRequest, Generall
|
||||
use tonic::Request;
|
||||
use tracing::{info, warn};
|
||||
|
||||
type TonicInterceptor = ecstore_rpc::TonicInterceptor;
|
||||
|
||||
/// gRPC lock client without authentication for testing
|
||||
/// Similar to RemoteClient but uses no_auth client
|
||||
#[derive(Debug, Clone)]
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
use crate::common::workspace_root;
|
||||
use futures::future::join_all;
|
||||
use rmp_serde::{Deserializer, Serializer};
|
||||
use rustfs_ecstore::api::{
|
||||
disk::{VolumeInfo, WalkDirOptions},
|
||||
rpc::{self as ecstore_rpc, TonicInterceptor},
|
||||
};
|
||||
use rustfs_ecstore::api::disk as ecstore_disk;
|
||||
use rustfs_ecstore::api::rpc as ecstore_rpc;
|
||||
use rustfs_filemeta::{MetaCacheEntry, MetacacheReader, MetacacheWriter};
|
||||
use rustfs_protos::proto_gen::node_service::WalkDirRequest;
|
||||
use rustfs_protos::{
|
||||
@@ -38,6 +36,10 @@ use tonic::codegen::tokio_stream::StreamExt;
|
||||
|
||||
const CLUSTER_ADDR: &str = "http://localhost:9000";
|
||||
|
||||
type TonicInterceptor = ecstore_rpc::TonicInterceptor;
|
||||
type VolumeInfo = ecstore_disk::VolumeInfo;
|
||||
type WalkDirOptions = ecstore_disk::WalkDirOptions;
|
||||
|
||||
fn signature_interceptor() -> TonicInterceptor {
|
||||
TonicInterceptor::Signature(ecstore_rpc::gen_tonic_signature_interceptor())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user