Skip to main content

Crate mnemo_grpc

Crate mnemo_grpc 

Source
Expand description

gRPC API server for Mnemo.

This crate exposes Mnemo’s core memory operations (remember, recall, forget) over gRPC using tonic. The protobuf service definition lives in proto/mnemo.proto and code is generated at build time via tonic-build.

§Usage

use std::sync::Arc;
use mnemo_grpc::router;

let engine: Arc<mnemo_core::query::MnemoEngine> = /* ... */;
let grpc_router = router(engine);

Modules§

proto

Structs§

MnemoGrpcServer
gRPC server backed by a shared MnemoEngine.

Functions§

router
Build a tonic::transport::server::Router serving the Mnemo gRPC API.
router_with_auth
Like router but with the bearer secret passed explicitly. Some(token) installs a tonic interceptor that requires authorization: <token> (a bare token or Bearer <token>) on every RPC; None runs open (with a warning).