Skip to main content

Crate astraea_server

Crate astraea_server 

Source
Expand description

TCP and gRPC front-ends for AstraeaDB.

AstraeaServer runs a newline-delimited JSON request loop over TCP (one protocol::Request per line, one protocol::Response per line); the grpc::AstraeaGrpcService provides a parallel tonic adapter. Both transports are thin and must route through a single RequestHandler::handle(Request) -> Response so feature parity is preserved. Cross-cutting concerns live in AuthManager, ConnectionManager, ServerMetrics, and TlsConfig.

Invariants: request_type_name in server.rs must have an arm for every Request variant — it drives metrics and RBAC. Vector-aware requests (VectorSearch, HybridSearch, SemanticNeighbors, SemanticWalk, anchor-less GraphRag) require constructing the server with Some(vector_index); otherwise they return an error rather than panic. collect_graph_stats and resolve_node_ids(None, ...) probe IDs 1..10_000 sequentially and silently truncate.

Re-exports§

pub use auth::ApiKeyEntry;
pub use auth::AuthManager;
pub use auth::Role;
pub use connection::ConnectionConfig;
pub use connection::ConnectionManager;
pub use handler::RequestHandler;
pub use metrics::ServerMetrics;
pub use protocol::Request;
pub use protocol::Response;
pub use server::AstraeaServer;
pub use server::ServerConfig;
pub use tls::TlsConfig;
pub use tls::TlsError;

Modules§

auth
Authentication and Role-Based Access Control (RBAC) for AstraeaDB.
connection
Connection management: pooling, backpressure, timeouts, and graceful shutdown.
grpc
gRPC transport layer for AstraeaDB.
handler
metrics
Observability: metrics collection and health endpoints for AstraeaDB.
protocol
server
tls
TLS/mTLS support for AstraeaDB server.