fe19c478c0
Eleventh PR of the alarms-over-gateway epic (docs/plans/alarms-over-gateway.md). Mirrors PR E.2's .NET surface on the Rust async SDK. Depends on PR E.1 (regen, merged). - GatewayClient::acknowledge_alarm — async unary call. Uses the existing unary_request helper (call timeout) and routes failures through Error mapping; non-OK protocol status promotes to Error::ProtocolStatus via ensure_protocol_success. - GatewayClient::query_active_alarms — async server-streaming call returning a new ActiveAlarmStream type alias (parallel to EventStream). Errors are pre-mapped from tonic::Status; dropping the stream cancels the call cooperatively. - GATEWAY_PROTOCOL_VERSION bumped 2 → 3 to match the .NET contract. - FakeGateway test impl extends to satisfy the new trait methods so client_behavior.rs builds. Two new integration tests cover the new SDK methods. Tests: - 12 unit + 10 client_behavior + 4 proto_fixtures = 26 tests, all pass under cargo test (Rust 1.x via existing toolchain). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
14 lines
567 B
Rust
14 lines
567 B
Rust
//! Build-time version constants advertised by the Rust client.
|
|
//!
|
|
//! The protocol versions track the values the gateway and worker negotiate on
|
|
//! `OpenSession` and let test harnesses cross-check the wire contract.
|
|
|
|
/// Semantic version of this Rust client crate. Mirrors `Cargo.toml`.
|
|
pub const CLIENT_VERSION: &str = "0.1.0-dev";
|
|
|
|
/// Public gateway gRPC protocol version this client targets.
|
|
pub const GATEWAY_PROTOCOL_VERSION: u32 = 3;
|
|
|
|
/// Internal worker IPC protocol version this client expects sessions to use.
|
|
pub const WORKER_PROTOCOL_VERSION: u32 = 1;
|