struct LogChannels {
db_tx: Sender<LogRecord>,
db_rx: Mutex<Option<Receiver<LogRecord>>>,
live_tx: Sender<LogRecord>,
dropped: AtomicU64,
}Expand description
进程级日志通道枢纽。
Fields§
§db_tx: Sender<LogRecord>落库通道发送端(Layer 每条事件 try_send 一份)。
db_rx: Mutex<Option<Receiver<LogRecord>>>落库通道接收端,启动时被 crate::tasks::log_writer 取走一次(take 语义)。
live_tx: Sender<LogRecord>实时流广播发送端(SSE 每连接 subscribe 一个 receiver)。
dropped: AtomicU64丢弃计数:mpsc 满 / 写库失败丢批,逐条累加(get_logs 响应透出)。
Auto Trait Implementations§
impl !Freeze for LogChannels
impl RefUnwindSafe for LogChannels
impl Send for LogChannels
impl Sync for LogChannels
impl Unpin for LogChannels
impl UnsafeUnpin for LogChannels
impl UnwindSafe for LogChannels
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<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.