Signed-off-by: mujunxiang <1948535941@qq.com>
This commit is contained in:
mujunxiang
2024-12-06 14:32:17 +08:00
committed by weisd
parent b7fdd5f70a
commit 707311f3d8
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ use super::{
background_heal_ops::HealTask,
data_scanner::HEAL_DELETE_DANGLING,
error::ERR_SKIP_FILE,
heal_commands::{HealOpts, HealScanMode, HealStopSuccess, HealingTracker, HEAL_ITEM_BUCKET_METADATA},
heal_commands::{HealOpts, HealScanMode, HealStopSuccess, HealingDisk, HealingTracker, HEAL_ITEM_BUCKET_METADATA},
};
use crate::store_api::StorageAPI;
use crate::{
+2 -4
View File
@@ -32,7 +32,7 @@ pub struct NotificationSys {
impl NotificationSys {
pub async fn new(eps: EndpointServerPools) -> Self {
let (peer_clients, all_peer_clients) = PeerRestClient::new_clients(eps).await;
let (peer_clients, all_peer_clients) = PeerRestClient::new_clients(&eps).await;
Self {
peer_clients,
all_peer_clients,
@@ -46,9 +46,7 @@ pub struct NotificationPeerErr {
}
impl NotificationSys {
pub fn rest_client_from_hash(&self, s:&str) ->Option<PeerRestClient>{
pub fn rest_client_from_hash(&self, s: &str) -> Option<PeerRestClient> {
None
}
pub async fn delete_policy(&self) -> Vec<NotificationPeerErr> {
+1
View File
@@ -9,6 +9,7 @@ use crate::{
use futures::StreamExt;
use http::HeaderMap;
use madmin::heal_commands::HealResultItem;
use madmin::info_commands::DiskMetrics;
use rmp_serde::Serializer;
use s3s::{dto::StreamingBlob, Body};
use serde::{Deserialize, Serialize};
+1
View File
@@ -18,3 +18,4 @@ psutil = "3.3.0"
serde.workspace = true
time.workspace =true
tracing.workspace = true
time.workspace =true
+4 -3
View File
@@ -4,6 +4,7 @@ use hyper::Uri;
use madmin::service_commands::ServiceTraceOpts;
use matchit::Params;
use s3s::{s3_error, Body, S3Request, S3Response, S3Result};
use tokio::sync::mpsc;
use tracing::warn;
use crate::admin::router::Operation;
@@ -24,11 +25,11 @@ impl Operation for Trace {
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
warn!("handle Trace");
let _trace_opts = extract_trace_options(&req.uri)?;
let trace_opts = extract_trace_options(&req.uri)?;
// let (tx, rx) = mpsc::channel(10000);
let _perrs = match GLOBAL_Endpoints.get() {
Some(ep) => PeerRestClient::new_clients(ep.clone()).await,
let perrs = match GLOBAL_Endpoints.get() {
Some(ep) => PeerRestClient::new_clients(ep).await,
None => (Vec::new(), Vec::new()),
};
return Err(s3_error!(NotImplemented));