NewConnectionManager 创建连接管理器
(config *types.Config)
| 39 | |
| 40 | // NewConnectionManager 创建连接管理器 |
| 41 | func NewConnectionManager(config *types.Config) *ConnectionManager { |
| 42 | return &ConnectionManager{ |
| 43 | config: config, |
| 44 | httpConnections: make(map[string]*HTTPConnectionPool), |
| 45 | tlsConnections: make(map[string]*TLSConnectionPool), |
| 46 | stats: &types.ConnectionStats{ |
| 47 | ActiveConnections: 0, |
| 48 | TotalConnections: 0, |
| 49 | FailedConnections: 0, |
| 50 | }, |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | // Start 启动连接管理器 |
| 55 | func (cm *ConnectionManager) Start() error { |