8f472a0443
- Integrate etcd-client for distributed coordination and leader election - Add remote client macros with proper formatting for all services - Implement RequestMetrics for tracking RPC performance and errors - Add rate limiting mechanism across all service endpoints - Create ElectionRequest and ElectionResult message types for leader election - Add role management with primary/replica switching capabilities - Implement health checker with automatic failover detection - Add repository count metrics for cluster monitoring - Update Cargo.toml with etcd-client and dashmap dependencies - Modify RepoEntry to include read_only flag for replica handling - Implement should_accept_election logic to prevent duplicate elections - Add RoleChangedEvent handling for cluster role updates
15 lines
476 B
Rust
15 lines
476 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
/// Information about a peer node, registered in etcd.
|
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
pub struct PeerInfo {
|
|
/// Logical storage name (e.g. "node-a", "default")
|
|
pub storage_name: String,
|
|
/// ractor_cluster TCP address (e.g. "10.0.1.4:4697")
|
|
pub cluster_addr: String,
|
|
/// gRPC service address (e.g. "http://10.0.1.4:50051")
|
|
pub grpc_addr: String,
|
|
/// Software version
|
|
pub version: String,
|
|
}
|