(proto string)
| 51 | } |
| 52 | |
| 53 | func getHTTPClient(proto string) (*http.Client, error) { |
| 54 | switch proto { |
| 55 | case config.ProtoHTTP2: |
| 56 | return getHTTP2Client(false), nil |
| 57 | case config.ProtoHTTP2C: |
| 58 | return getHTTP2Client(true), nil |
| 59 | default: |
| 60 | return getHTTP1Client(), nil |
| 61 | } |
| 62 | |
| 63 | return nil, fmt.Errorf("unsupported HTTP-family protocol %s", proto) |
| 64 | } |
| 65 | |
| 66 | func getHTTPAddr(proto, targetHost, port string) string { |
| 67 | scheme := getHTTPScheme(proto) |
no test coverage detected