pub struct CoreClient { /* private fields */ }Expand description
Client for AllSource Core (writes).
Connects directly to Core (default port 3900) for event ingestion.
Use this for write operations; use QueryClient for reads.
Implementations§
Source§impl CoreClient
impl CoreClient
Sourcepub fn with_config(config: ClientConfig) -> Result<Self, Error>
pub fn with_config(config: ClientConfig) -> Result<Self, Error>
Create with full configuration.
Sourcepub async fn ingest_event(
&self,
input: IngestEventInput,
) -> Result<IngestResponse, Error>
pub async fn ingest_event( &self, input: IngestEventInput, ) -> Result<IngestResponse, Error>
Ingest a single event.
Event types are automatically normalized to AllSource’s lowercase.dot.separated
convention. For example, VerificationCreated becomes verification.created.
Sourcepub async fn ingest_batch(
&self,
events: Vec<IngestEventInput>,
) -> Result<BatchIngestResponse, Error>
pub async fn ingest_batch( &self, events: Vec<IngestEventInput>, ) -> Result<BatchIngestResponse, Error>
Ingest a batch of events.
Event types are automatically normalized to AllSource’s lowercase.dot.separated
convention. For example, VerificationCreated becomes verification.created.
Sourcepub async fn health(&self) -> Result<HealthResponse, Error>
pub async fn health(&self) -> Result<HealthResponse, Error>
Check Core health.
Trait Implementations§
Source§impl Clone for CoreClient
impl Clone for CoreClient
Source§fn clone(&self) -> CoreClient
fn clone(&self) -> CoreClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CoreClient
impl !RefUnwindSafe for CoreClient
impl Send for CoreClient
impl Sync for CoreClient
impl Unpin for CoreClient
impl UnsafeUnpin for CoreClient
impl !UnwindSafe for CoreClient
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