| // Copyright 2011 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. |
| // Bridge package to expose http internals to tests in the http_test |
| func (t *Transport) IdleConnKeysForTesting() (keys []string) { |
| for key := range t.idleConn { |
| func (t *Transport) IdleConnCountForTesting(cacheKey string) int { |
| conns, ok := t.idleConn[cacheKey] |
| func NewTestTimeoutHandler(handler Handler, ch <-chan int64) Handler { |
| f := func() <-chan int64 { |
| return &timeoutHandler{handler, f, ""} |