pub struct VectorSourceConfig {
pub name: String,
pub paths: Vec<String>,
pub read_from: String,
pub multiline: bool,
pub multiline_pattern: Option<String>,
pub ignore_not_found: bool,
pub include: Vec<String>,
pub exclude: Vec<String>,
}Expand description
Vector 源配置
Fields§
§name: String源名称(默认 app_logs)
paths: Vec<String>日志文件路径(支持通配符,如 logs/*.log)
read_from: String读取模式(beginning | end)
- beginning: 从文件开头读取(适用于新文件)
- end: 从文件末尾读取(适用于已存在的文件)
multiline: bool是否启用多行日志解析(默认 false)
multiline_pattern: Option<String>多行日志模式(multiline 为 true 时使用) 例如:r“^\d{4}-\d{2}-\d{2}“ 匹配以日期开头的行
ignore_not_found: bool是否忽略未找到的文件(默认 false)
include: Vec<String>包含的文件模式(glob 模式,默认包含所有匹配的文件)
exclude: Vec<String>排除的文件模式(glob 模式)
Trait Implementations§
Source§impl Clone for VectorSourceConfig
impl Clone for VectorSourceConfig
Source§fn clone(&self) -> VectorSourceConfig
fn clone(&self) -> VectorSourceConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 VectorSourceConfig
impl Debug for VectorSourceConfig
Source§impl Default for VectorSourceConfig
impl Default for VectorSourceConfig
Source§impl<'de> Deserialize<'de> for VectorSourceConfig
impl<'de> Deserialize<'de> for VectorSourceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for VectorSourceConfig
impl RefUnwindSafe for VectorSourceConfig
impl Send for VectorSourceConfig
impl Sync for VectorSourceConfig
impl Unpin for VectorSourceConfig
impl UnwindSafe for VectorSourceConfig
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