pub struct PostgresExporter { /* private fields */ }Expand description
PostgreSQL 导出器 - 使用 CSV + psql COPY FROM
Implementations§
Trait Implementations§
Source§impl Debug for PostgresExporter
impl Debug for PostgresExporter
Source§impl Drop for PostgresExporter
impl Drop for PostgresExporter
Source§impl Exporter for PostgresExporter
impl Exporter for PostgresExporter
Source§fn initialize(&mut self) -> Result<()>
fn initialize(&mut self) -> Result<()>
初始化导出器 (例如:创建文件、连接数据库、创建表等)
Source§fn export_batch(&mut self, sqllogs: &[&Sqllog<'_>]) -> Result<()>
fn export_batch(&mut self, sqllogs: &[&Sqllog<'_>]) -> Result<()>
批量导出多条日志记录 (默认实现:逐条调用 export)
Source§fn stats_snapshot(&self) -> Option<ExportStats>
fn stats_snapshot(&self) -> Option<ExportStats>
获取导出统计信息的快照
默认返回 None;具体导出器可覆盖此方法以提供统计信息
Auto Trait Implementations§
impl !Freeze for PostgresExporter
impl !RefUnwindSafe for PostgresExporter
impl Send for PostgresExporter
impl !Sync for PostgresExporter
impl Unpin for PostgresExporter
impl UnsafeUnpin for PostgresExporter
impl !UnwindSafe for PostgresExporter
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
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