Source file
src/net/http/omithttp2client.go
1
2
3
4
5
6
7 package http
8
9 import (
10 "context"
11 "errors"
12 "net"
13 )
14
15
16
17
18 const omitHTTP2Client = true
19
20 const noHTTP2 = "no bundled HTTP/2"
21
22 func (t *Transport) configureHTTP2(protocols Protocols) {}
23 func (t *Transport) http2AddConn(scheme, authority string, nc net.Conn) (RoundTripper, error) {
24 return nil, errors.ErrUnsupported
25 }
26 func (t *Transport) http2ExternalDial(ctx context.Context, cm connectMethod) (RoundTripper, error) {
27 return nil, errors.ErrUnsupported
28 }
29 func (t *Transport) http2NewClientConn(nc net.Conn, internalStateHook func()) (RoundTripper, error) {
30 return nil, errors.ErrUnsupported
31 }
32 func (t *Transport) http2NewClientConnFromContext(ctx context.Context) (*ClientConn, error) {
33 return nil, errors.ErrUnsupported
34 }
35
36 type http2Transport struct{}
37 type http2ExternalTransportConfig interface {
38 ExternalRoundTrip() bool
39 RoundTrip(*Request) (*Response, error)
40 Registered(*Transport)
41 unimplementable()
42 }
43
44 func (*http2Transport) CloseIdleConnections() {}
45 func (*http2Transport) IdleConnStrsForTesting() []string { return nil }
46
47 type http2RoundTripper struct{}
48
49 func (http2RoundTripper) RoundTrip(*Request) (*Response, error) { panic(noHTTP2) }
50
View as plain text