()
| 136 | } |
| 137 | |
| 138 | func (l *freelist) newClient() (*rpc.Client, error) { |
| 139 | conn, err := Dial(l.target) |
| 140 | if err != nil { |
| 141 | return nil, errors.Wrap(err, "dialing new connection failed") |
| 142 | } |
| 143 | return NewClient(conn), err |
| 144 | } |
| 145 | |
| 146 | // ClientPool is the struct type of connection pool. |
| 147 | type ClientPool struct { |