pub struct Client {
pub transport: TCPTransport,
}
Fields§
§transport: TCPTransport
Implementations§
Source§impl Client
impl Client
Sourcepub fn connect<A: ToSocketAddrs + ?Sized>(addr: &A) -> Result<Self>
pub fn connect<A: ToSocketAddrs + ?Sized>(addr: &A) -> Result<Self>
Connect to a Riemann server using raw TCP.
Sourcepub fn connect_tls(
hostname: &str,
port: u16,
ca_file: &str,
cert_file: &str,
key_file: &str,
) -> Result<Self>
pub fn connect_tls( hostname: &str, port: u16, ca_file: &str, cert_file: &str, key_file: &str, ) -> Result<Self>
Connect to a Riemann server using mTLS over TCP.
Sourcepub fn set_timeout(&mut self, timeout: Option<Duration>) -> Result<()>
pub fn set_timeout(&mut self, timeout: Option<Duration>) -> Result<()>
Set a read and write timeout for the underlying socket
Sourcepub fn events(&mut self, events: Vec<Event>) -> Result<()>
pub fn events(&mut self, events: Vec<Event>) -> Result<()>
Send multiple events, discarding the response if it is not an error.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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