NotificationBus for cross-node message delivery fan-out: - NotificationBus trait: publish(topic) + subscribe(topic) -> Notify - InMemoryNotificationBus: single-node default via tokio::sync::Notify - Designed for Redis pub/sub or NATS replacement in multi-node deploys - 3 async tests: publish wakes, timeout without publish, independent topics Health endpoint enhancements for load balancer awareness: - HealthResponse proto: add node_id, version, uptime_secs, storage_backend - ServerState: add node_id, start_time, storage_backend fields - Health handler returns full node identity for multi-node monitoring
35 lines
720 B
Protocol Buffer
35 lines
720 B
Protocol Buffer
syntax = "proto3";
|
|
package qpq.v1;
|
|
|
|
// P2P endpoint publish/resolve + health (3 methods).
|
|
// Method IDs: 800-802.
|
|
|
|
message PublishEndpointRequest {
|
|
bytes identity_key = 1;
|
|
bytes node_addr = 2;
|
|
}
|
|
|
|
message PublishEndpointResponse {}
|
|
|
|
message ResolveEndpointRequest {
|
|
bytes identity_key = 1;
|
|
}
|
|
|
|
message ResolveEndpointResponse {
|
|
bytes node_addr = 1;
|
|
}
|
|
|
|
message HealthRequest {}
|
|
|
|
message HealthResponse {
|
|
string status = 1;
|
|
// Unique node identifier for multi-node deployments.
|
|
string node_id = 2;
|
|
// Server version string.
|
|
string version = 3;
|
|
// Uptime in seconds since process start.
|
|
uint64 uptime_secs = 4;
|
|
// Storage backend type (e.g. "sql", "file", "postgres").
|
|
string storage_backend = 5;
|
|
}
|