Crate toondb_grpc

Crate toondb_grpc 

Source
Expand description

ToonDB gRPC Services

This crate provides a comprehensive gRPC interface for ToonDB operations. It implements a “Thick Server / Thin Client” architecture where all business logic lives in the Rust server, enabling thin SDK wrappers in any language.

§Services

  • VectorIndexService: HNSW vector operations
  • GraphService: Graph overlay for agent memory
  • PolicyService: Policy evaluation and enforcement
  • ContextService: LLM context assembly with token budgets
  • CollectionService: Collection management
  • NamespaceService: Multi-tenant namespace management
  • SemanticCacheService: Semantic caching for LLM queries
  • TraceService: Trace/span management
  • CheckpointService: State checkpoint and restore
  • McpService: MCP tool routing
  • KvService: Basic key-value operations

§Usage

# Start the gRPC server
toondb-grpc-server --port 50051

# From Python client
import grpc
from toondb.proto import toondb_pb2, toondb_pb2_grpc

channel = grpc.insecure_channel('localhost:50051')
stub = toondb_pb2_grpc.VectorIndexServiceStub(channel)

Re-exports§

pub use server::VectorIndexServer;
pub use error::GrpcError;

Modules§

checkpoint_server
Checkpoint Service gRPC Implementation
collection_server
Collection Service gRPC Implementation
context_server
Context Service gRPC Implementation
error
Error types for gRPC service
graph_server
Graph Service gRPC Implementation
kv_server
KV Service gRPC Implementation
mcp_server
MCP Service gRPC Implementation
namespace_server
Namespace Service gRPC Implementation
policy_server
Policy Service gRPC Implementation
proto
semantic_cache_server
Semantic Cache Service gRPC Implementation
server
gRPC Server implementation for Vector Index Service
trace_server
Trace Service gRPC Implementation