Skip to main content

Crate deepstore_client

Crate deepstore_client 

Source
Expand description

DeepStore Rust Client

High-level client for DeepStore that orchestrates control plane and data plane calls. Mirrors the TypeScript @alienplatform/deepstore-client package but uses auto-generated Rust SDKs.

§Architecture

DeepstoreClient
  ├─ Control Plane (deepstore-server-client)
  │   └─ List splits, SSE streaming
  └─ Data Plane (deepstore-agent-client via auth proxy)
      └─ Search, draft documents

§Usage

use deepstore_client::{DeepstoreClient, SearchParams};
use chrono::Utc;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = DeepstoreClient::builder()
        .control_plane_url("https://deepstore.example.com")
        .auth_proxy_url("https://agent-manager.example.com")
        .query_token_provider(|| async { Ok("jwt_token".to_string()) })
        .build()?;

    let results = client.search(SearchParams {
        database_id: "db_abc123".to_string(),
        query: "level:error".to_string(),
        start_time: Utc::now() - chrono::Duration::hours(1),
        end_time: Utc::now(),
        max_hits: Some(100),
        ..Default::default()
    }).await?;

    println!("Found {} hits", results.num_hits);
    Ok(())
}

Structs§

DeepstoreClient
High-level DeepStore client that coordinates control plane and data plane calls
DeepstoreClientBuilder
Builder for DeepStore client
DraftDocumentBatch
Batch of documents from draft files
SearchParams
Parameters for searching logs
SearchResult
Search results from DeepStore
StreamParams
Parameters for streaming logs

Enums§

DeepstoreError
DeepStore client errors

Type Aliases§

QueryTokenProvider
Query token provider function
Result