Thanks to visit codestin.com
Credit goes to docs.rs

Skip to main content

Module events

Module events 

Source
Expand description

SSE streaming event types and client support (CE-1).

§Usage

use dakera_client::DakeraClient;
use tokio::sync::mpsc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DakeraClient::new("http://localhost:3000")?;

    let mut rx = client.stream_namespace_events("my-ns").await?;
    while let Some(result) = rx.recv().await {
        let event = result?;
        println!("Event: {:?}", event);
    }
    Ok(())
}

Structs§

MemoryEvent
A memory lifecycle event received from the GET /v1/events/stream SSE endpoint (DASH-B).

Enums§

DakeraEvent
An event received from a Dakera SSE stream.
OpStatus
Operation status for DakeraEvent::OperationProgress events.
VectorMutationOp
Vector mutation operation type for DakeraEvent::VectorsMutated events.