RPC layer (quicprochat-rpc): - RpcClient now uses tokio::sync::Mutex<Connection> for safe reconnection - Auto-reconnect with exponential backoff + jitter on retriable errors - QUIC-level keepalive via quinn TransportConfig - subscribe_push() returns Option<PushFrame> with None sentinel on break - RpcError::is_retriable() classifies transient vs permanent errors - ConnectionState enum (Connected/Reconnecting/Disconnected) with Display - Configurable max_retries, base_delay, max_backoff, keepalive_secs SDK layer (quicprochat-sdk): - QpqClient wraps RpcClient in Arc for safe heartbeat task sharing - start_heartbeat() spawns background task checking connection every 30s - connection_state() exposes RPC-layer state to UI - Reconnecting event added to ClientEvent enum - disconnect() aborts heartbeat before closing connection Client UI (quicprochat-client): - TUI status bar shows Connected/Reconnecting.../Offline with color - TUI handles Reconnecting event with attempt count display - REPL event listener prints connection state changes - REPL /status shows connection state instead of bool - Both TUI and REPL call start_heartbeat() on startup
32 lines
1007 B
TOML
32 lines
1007 B
TOML
[package]
|
|
name = "quicprochat-rpc"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
description = "QUIC RPC framework for quicprochat v2 — framing, dispatch, tower middleware"
|
|
license = "Apache-2.0 OR MIT"
|
|
repository.workspace = true
|
|
|
|
[dependencies]
|
|
quicprochat-proto = { path = "../quicprochat-proto" }
|
|
prost = { workspace = true }
|
|
bytes = { workspace = true }
|
|
quinn = { workspace = true }
|
|
rustls = { workspace = true }
|
|
rcgen = { workspace = true }
|
|
tokio = { workspace = true }
|
|
futures = { workspace = true }
|
|
tower = { workspace = true }
|
|
tracing = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
dashmap = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
rand = { workspace = true }
|
|
uuid = { version = "1", features = ["v7"] }
|
|
metrics = "0.22"
|
|
|
|
[dev-dependencies]
|
|
tokio = { workspace = true, features = ["test-util"] }
|
|
|
|
[lints]
|
|
workspace = true
|