This commit is contained in:
houseme
2025-06-23 04:15:05 +08:00
parent 928453db62
commit 5155a3d544
8 changed files with 16 additions and 20 deletions
-4
View File
@@ -73,10 +73,6 @@ pub struct Opt {
#[arg(long, env = "RUSTFS_LICENSE")]
pub license: Option<String>,
/// event notifier config file
#[arg(long, env = "RUSTFS_EVENT_CONFIG")]
pub event_config: Option<String>,
}
// lazy_static::lazy_static! {
+1 -1
View File
@@ -516,7 +516,7 @@ async fn run(opt: config::Opt) -> Result<()> {
// GLOBAL_EVENT_SYS.init(store.clone()).await?;
// Initialize event notifier
event::init_event_notifier(opt.event_config).await;
event::init_event_notifier().await;
let buckets_list = store
.list_bucket(&BucketOptions {
-1
View File
@@ -66,7 +66,6 @@ use policy::policy::Validator;
use query::instance::make_rustfsms;
use rustfs_filemeta::headers::RESERVED_METADATA_PREFIX_LOWER;
use rustfs_filemeta::headers::{AMZ_DECODED_CONTENT_LENGTH, AMZ_OBJECT_TAGGING};
use rustfs_notify::EventName;
use rustfs_rio::CompressReader;
use rustfs_rio::HashReader;
use rustfs_rio::Reader;
+4
View File
@@ -3,6 +3,7 @@ use s3s::{S3Request, S3Response};
use std::collections::HashMap;
/// Extract request parameters from S3Request, mainly header information.
#[allow(dead_code)]
pub fn extract_req_params<T>(req: &S3Request<T>) -> HashMap<String, String> {
let mut params = HashMap::new();
for (key, value) in req.headers.iter() {
@@ -14,6 +15,7 @@ pub fn extract_req_params<T>(req: &S3Request<T>) -> HashMap<String, String> {
}
/// Extract response elements from S3Response, mainly header information.
#[allow(dead_code)]
pub fn extract_resp_elements<T>(resp: &S3Response<T>) -> HashMap<String, String> {
let mut params = HashMap::new();
for (key, value) in resp.headers.iter() {
@@ -25,6 +27,7 @@ pub fn extract_resp_elements<T>(resp: &S3Response<T>) -> HashMap<String, String>
}
/// Get host from header information.
#[allow(dead_code)]
pub fn get_request_host(headers: &HeaderMap) -> String {
headers
.get("host")
@@ -34,6 +37,7 @@ pub fn get_request_host(headers: &HeaderMap) -> String {
}
/// Get user-agent from header information.
#[allow(dead_code)]
pub fn get_request_user_agent(headers: &HeaderMap) -> String {
headers
.get("user-agent")