pub struct NoopAdapter { /* private fields */ }Expand description
No-op adapter that discards all events.
This adapter is useful for:
- Measuring pure ingestion throughput
- Testing without a backend
- Development/prototyping
Implementations§
Source§impl NoopAdapter
impl NoopAdapter
Sourcepub fn batches_received(&self) -> u64
pub fn batches_received(&self) -> u64
Get the number of batches received.
Sourcepub fn events_received(&self) -> u64
pub fn events_received(&self) -> u64
Get the number of events received.
Trait Implementations§
Source§impl Adapter for NoopAdapter
impl Adapter for NoopAdapter
Source§fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn init<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the adapter. Read more
Source§fn on_batch<'life0, 'async_trait>(
&'life0 self,
batch: Arc<Batch>,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn on_batch<'life0, 'async_trait>(
&'life0 self,
batch: Arc<Batch>,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Process a batch of events. Read more
Source§fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Force flush any buffered data. Read more
Source§fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gracefully shut down the adapter. Read more
Source§fn poll_shard<'life0, 'life1, 'async_trait>(
&'life0 self,
_shard_id: u16,
_from_id: Option<&'life1 str>,
_limit: usize,
) -> Pin<Box<dyn Future<Output = Result<ShardPollResult, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll_shard<'life0, 'life1, 'async_trait>(
&'life0 self,
_shard_id: u16,
_from_id: Option<&'life1 str>,
_limit: usize,
) -> Pin<Box<dyn Future<Output = Result<ShardPollResult, AdapterError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Poll events from a single shard. Read more
Source§impl Debug for NoopAdapter
impl Debug for NoopAdapter
Source§impl Default for NoopAdapter
impl Default for NoopAdapter
Source§fn default() -> NoopAdapter
fn default() -> NoopAdapter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for NoopAdapter
impl RefUnwindSafe for NoopAdapter
impl Send for NoopAdapter
impl Sync for NoopAdapter
impl Unpin for NoopAdapter
impl UnsafeUnpin for NoopAdapter
impl UnwindSafe for NoopAdapter
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