go/src/net/http/export_test.go

var DefaultUserAgent

var NewLoggingConn

var ExportAppendTime

var ExportRefererForURL

var ExportServerNewConn

var ExportCloseWriteAndWait

var ExportErrRequestCanceled

var ExportErrRequestCanceledConn

var ExportErrServerClosedIdle

var ExportServeFile

var ExportScanETag

var ExportHttp2ConfigureServer

var Export_shouldCopyHeaderOnRedirect

var Export_writeStatusLine

var Export_is408Message

var MaxWriteWaitBeforeConnReuse

func init() {}

func CondSkipHTTP2(t testing.TB) {}

var SetEnterRoundTripHook

var SetRoundTripRetried

func SetReadLoopBeforeNextReadHook(f func()) {}

// SetPendingDialHooks sets the hooks that run before and after handling
// pending dials.
func SetPendingDialHooks(before, after func()) {}

func SetTestHookServerServe(fn func(*Server, net.Listener)) {}

func SetTestHookProxyConnectTimeout(t *testing.T, f func(context.Context, time.Duration) (context.Context, context.CancelFunc)) {}

func NewTestTimeoutHandler(handler Handler, ctx context.Context) Handler {}

func ResetCachedEnvironment() {}

func (t *Transport) NumPendingRequestsForTesting() int {}

func (t *Transport) IdleConnKeysForTesting() (keys []string) {}

func (t *Transport) IdleConnKeyCountForTesting() int {}

func (t *Transport) IdleConnStrsForTesting() []string {}

func (t *Transport) IdleConnStrsForTesting_h2() []string {}

func (t *Transport) IdleConnCountForTesting(scheme, addr string) int {}

func (t *Transport) IdleConnWaitMapSizeForTesting() int {}

func (t *Transport) IsIdleForTesting() bool {}

func (t *Transport) QueueForIdleConnForTesting() {}

// PutIdleTestConn reports whether it was able to insert a fresh
// persistConn for scheme, addr into the idle connection pool.
func (t *Transport) PutIdleTestConn(scheme, addr string) bool {}

// PutIdleTestConnH2 reports whether it was able to insert a fresh
// HTTP/2 persistConn for scheme, addr into the idle connection pool.
func (t *Transport) PutIdleTestConnH2(scheme, addr string, alt RoundTripper) bool {}

// All test hooks must be non-nil so they can be called directly,
// but the tests use nil to mean hook disabled.
func unnilTestHook(f *func()) {}

func hookSetter(dst *func()) func(func()) {}

func ExportHttp2ConfigureTransport(t *Transport) error {}

func (s *Server) ExportAllConnsIdle() bool {}

func (s *Server) ExportAllConnsByState() map[ConnState]int {}

func (r *Request) WithT(t *testing.T) *Request {}

func ExportSetH2GoawayTimeout(d time.Duration) (restore func()) {}

func (r *Request) ExportIsReplayable() bool {}

// ExportCloseTransportConnsAbruptly closes all idle connections from
// tr in an abrupt way, just reaching into the underlying Conns and
// closing them, without telling the Transport or its persistConns
// that it's doing so. This is to simulate the server closing connections
// on the Transport.
func ExportCloseTransportConnsAbruptly(tr *Transport) {}

// ResponseWriterConnForTesting returns w's underlying connection, if w
// is a regular *response ResponseWriter.
func ResponseWriterConnForTesting(w ResponseWriter) (c net.Conn, ok bool) {}

func init() {}

// SetRSTAvoidanceDelay sets how long we are willing to wait between calling
// CloseWrite on a connection and fully closing the connection.
func SetRSTAvoidanceDelay(t *testing.T, d time.Duration) {}