pub struct CollectorConfig {
pub log_dirs: Vec<String>,
pub scan_interval_secs: u64,
pub daily_trigger_hour: u8,
pub distinct_count_threshold: u32,
pub cooldown_duration: Duration,
pub max_retries: u32,
pub retry_base_delay: Duration,
pub repo_map: HashMap<String, String>,
}Expand description
收集器配置。
控制扫描周期、触发条件、重试策略和组件仓库映射。 未显式配置的字段使用默认值。
Fields§
§log_dirs: Vec<String>日志扫描目录列表,支持 glob pattern,默认空(需手动配置)。
scan_interval_secs: u64日志扫描间隔(秒),默认 300(5 分钟)。
daily_trigger_hour: u8每日触发小时(UTC),默认 2(即 UTC 02:00)。
distinct_count_threshold: u32不同签名数量阈值,达到后触发上报,默认 20。
cooldown_duration: Duration上报成功后的冷却时间,默认 1 小时。
max_retries: u32最大重试次数,默认 3。
retry_base_delay: Duration重试基础延迟(指数退避),默认 5 分钟。
repo_map: HashMap<String, String>组件名 → GitHub 仓库(owner/repo)映射。
Implementations§
Source§impl CollectorConfig
impl CollectorConfig
Trait Implementations§
Source§impl Clone for CollectorConfig
impl Clone for CollectorConfig
Source§fn clone(&self) -> CollectorConfig
fn clone(&self) -> CollectorConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollectorConfig
impl Debug for CollectorConfig
Auto Trait Implementations§
impl Freeze for CollectorConfig
impl RefUnwindSafe for CollectorConfig
impl Send for CollectorConfig
impl Sync for CollectorConfig
impl Unpin for CollectorConfig
impl UnsafeUnpin for CollectorConfig
impl UnwindSafe for CollectorConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more