blob: 67b3eba3dec664a4265e500ed970c155df783aea [file]
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build nethttpomithttp2 || nethttpomithttp2client
package http
import (
"context"
"errors"
"net"
"time"
)
// omitHTTP2Client is true when the nethttpomithttp2 or
// nethttpomithttp2client build tag is set, which means http2client.go
// isn't compiled in and we shouldn't try to use it.
const omitHTTP2Client = true
const noHTTP2 = "no bundled HTTP/2" // should never see this
func (t *Transport) configureHTTP2(protocols Protocols) {}
func (t *Transport) registerHTTP2Config() {}
func (t *Transport) http2ExternalDial(ctx context.Context, cm connectMethod, isClientConn bool, internalStateHook func() error) (genericClientConn, error) {
return nil, errors.ErrUnsupported
}
func (t *Transport) http2NewClientConn(nc net.Conn, isClientConn bool, internalStateHook func() error) (genericClientConn, error) {
return nil, errors.ErrUnsupported
}
func (t *Transport) http2NewClientConnFromContext(ctx context.Context) (*ClientConn, error) {
return nil, errors.ErrUnsupported
}
type http2Transport struct{}
type http2ExternalTransportConfig interface {
HTTP2Config() HTTP2Config
ExternalRoundTrip() bool
RoundTrip(*Request) (*Response, error)
Registered(*Transport)
IdleConnTimeout() time.Duration
unimplementable()
}