Crate reifydb_sub_server

Crate reifydb_sub_server 

Source
Expand description

Common infrastructure for HTTP and WebSocket server subsystems.

This crate provides shared types and utilities used by sub-server-http and sub-server-ws. It includes:

  • Authentication: Identity extraction from headers and tokens
  • Execution: Async wrappers around synchronous database operations
  • Response: Frame conversion for JSON serialization
  • Runtime: Shared tokio runtime management
  • State: Application state for request handlers

Structs§

AppState
Shared application state passed to all request handlers.
QueryConfig
Configuration for query execution.
ResponseColumn
A column in a response frame.
ResponseFrame
A response frame containing query/command results.
SharedRuntime
Shared tokio runtime for all network subsystems.

Enums§

AuthError
Authentication error types.
ExecuteError
Error types for query/command execution.

Functions§

anonymous_identity
Create an anonymous identity for unauthenticated requests.
convert_frames
Convert database result frames to response frames.
execute_command
Execute a command on the blocking thread pool with timeout.
execute_command_single
Execute a single command statement on the blocking thread pool with timeout.
execute_query
Execute a query on the blocking thread pool with timeout.
execute_query_single
Execute a single query statement on the blocking thread pool with timeout.
extract_identity_from_api_key
Extract identity from an API key.
extract_identity_from_auth_header
Extract identity from HTTP Authorization header value.
extract_identity_from_ws_auth
Extract identity from WebSocket authentication message.
get_num_cpus
Returns the number of available CPUs of the current system.
root_identity
Create a root system identity.

Type Aliases§

AuthResult
Result type for authentication operations.
ExecuteResult
Result type for execute operations.