rpc连接过多浪费资源,循环利用
package rpc
import (
"sync"
)
var rpcClientPoolMap map[string]*connPool
func init() {
rpcClientPoolMap = make(map[string]*connPool)
}
type connPool struct {
name string
MaxConnCount int
poolCap int
mu sync.Mutex
clientPool chan *PaymentClient
}
func