mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-10 23:26:53 +00:00
fix
This commit is contained in:
@@ -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
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user