Expand description
Connection multiplexing for coordinator communication.
This module provides connection pooling and multiplexing capabilities for efficient HTTP communication with the coordinator. It reduces connection overhead by reusing existing connections and queuing requests.
§Features
- Connection pooling with configurable size limits
- Automatic connection health monitoring
- Request queuing and fair scheduling
- Exponential backoff retry logic
- Connection keep-alive management
- Circuit breaker integration for failed connections
§Example
use chie_core::connection_multiplexing::{ConnectionPool, PoolConfig};
use std::time::Duration;
// Configure connection pool
let config = PoolConfig::default()
.with_max_connections(10)
.with_idle_timeout(Duration::from_secs(60));
// Create pool
let pool = ConnectionPool::new("https://coordinator.example.com", config);
// Make requests through the pool
let response = pool.request("POST", "/api/proofs", b"proof_data").await?;Structs§
- Connection
Pool - HTTP connection pool with multiplexing support.
- Pool
Config - Configuration for the connection pool.
- Pool
Stats - Statistics for the connection pool.
Enums§
- Connection
Error - Errors that can occur during connection pool operations.