Struct gelf::TcpBackend
source · pub struct TcpBackend { /* private fields */ }
Expand description
TcpBackend is a simple GELF over TCP backend.
WireMessages are simply serialized and optionally compressed and pushed to a Gelf host over TCP. TCP’s stream-based nature requires no chunking.
Implementations
sourceimpl TcpBackend
impl TcpBackend
sourcepub fn new<T: ToSocketAddrs>(destination: T) -> Result<TcpBackend>
pub fn new<T: ToSocketAddrs>(destination: T) -> Result<TcpBackend>
Construct a new TcpBackend.
sourcepub fn compression(&self) -> MessageCompression
pub fn compression(&self) -> MessageCompression
Return the current set compression algorithm
sourcepub fn set_compression(&mut self, compression: MessageCompression) -> &mut Self
pub fn set_compression(&mut self, compression: MessageCompression) -> &mut Self
Set the compression algorithm
Trait Implementations
sourceimpl Backend for TcpBackend
impl Backend for TcpBackend
sourcefn log_message(&self, msg: WireMessage<'_>) -> Result<()>
fn log_message(&self, msg: WireMessage<'_>) -> Result<()>
Log a message over TCP.
sourceimpl Drop for TcpBackend
impl Drop for TcpBackend
Auto Trait Implementations
impl RefUnwindSafe for TcpBackend
impl Send for TcpBackend
impl Sync for TcpBackend
impl Unpin for TcpBackend
impl UnwindSafe for TcpBackend
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more