pub struct Sender { /* private fields */ }
Expand description
Connects to a QuestDB instance and inserts data via the ILP protocol.
- To construct an instance, use the
SenderBuilder
. - To prepare messages, use
Buffer
objects. - To send messages, call the
flush
method.
Implementations§
source§impl Sender
impl Sender
sourcepub fn flush_and_keep(&mut self, buf: &Buffer) -> Result<()>
pub fn flush_and_keep(&mut self, buf: &Buffer) -> Result<()>
Send buffer to the QuestDB server, without clearing the buffer.
This will block until the buffer is flushed to the network socket. This does not guarantee that the buffer will be sent to the server or that the server has received it.
sourcepub fn flush(&mut self, buf: &mut Buffer) -> Result<()>
pub fn flush(&mut self, buf: &mut Buffer) -> Result<()>
Send buffer to the QuestDB server, clearing the buffer.
This will block until the buffer is flushed to the network socket. This does not guarantee that the buffer will be sent to the server or that the server has received it.
sourcepub fn must_close(&self) -> bool
pub fn must_close(&self) -> bool
The sender is no longer usable and must be dropped.
This is caused if there was an earlier failure.