Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 16 for ClientTrace (0.21 sec)

  1. src/net/http/httptrace/trace_test.go

    	tests := [...]struct {
    		trace, old *ClientTrace
    		want       string
    	}{
    		0: {
    			want: "T",
    			trace: &ClientTrace{
    				ConnectStart: connectStart('T'),
    			},
    		},
    		1: {
    			want: "TO",
    			trace: &ClientTrace{
    				ConnectStart: connectStart('T'),
    			},
    			old: &ClientTrace{ConnectStart: connectStart('O')},
    		},
    		2: {
    			want:  "O",
    			trace: &ClientTrace{},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 17:34:30 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. src/net/http/httptrace/trace.go

    )
    
    // unique type to prevent assignment.
    type clientEventContextKey struct{}
    
    // ContextClientTrace returns the [ClientTrace] associated with the
    // provided context. If none, it returns nil.
    func ContextClientTrace(ctx context.Context) *ClientTrace {
    	trace, _ := ctx.Value(clientEventContextKey{}).(*ClientTrace)
    	return trace
    }
    
    // WithClientTrace returns a new context based on the provided parent
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 10 03:29:50 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. internal/rest/rpc-stats.go

    	return s
    }
    
    // Return a function which update the global stats related to tcp connections
    func setupReqStatsUpdate(req *http.Request) (*http.Request, func()) {
    	var dialStart, dialEnd int64
    
    	trace := &httptrace.ClientTrace{
    		ConnectStart: func(network, addr string) {
    			atomic.StoreInt64(&dialStart, time.Now().UnixNano())
    		},
    		ConnectDone: func(network, addr string, err error) {
    			if err == nil {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Sep 29 16:27:58 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  4. src/net/http/header.go

    	textproto.MIMEHeader(h).Del(key)
    }
    
    // Write writes a header in wire format.
    func (h Header) Write(w io.Writer) error {
    	return h.write(w, nil)
    }
    
    func (h Header) write(w io.Writer, trace *httptrace.ClientTrace) error {
    	return h.writeSubset(w, nil, trace)
    }
    
    // Clone returns a copy of h or nil if h is nil.
    func (h Header) Clone() Header {
    	if h == nil {
    		return nil
    	}
    
    	// Find total number of values.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 22:14:00 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. src/net/http/transport_dial_test.go

    	}
    	dt.roundTripCount++
    	dt.t.Logf("RoundTrip %v: started", rt.roundTripID)
    	dt.t.Cleanup(func() {
    		rt.cancel()
    		rt.finish()
    	})
    	go func() {
    		ctx = httptrace.WithClientTrace(ctx, &httptrace.ClientTrace{
    			GotConn: func(info httptrace.GotConnInfo) {
    				rt.conn = info.Conn.(*transportDialTesterConn)
    			},
    		})
    		req, _ := http.NewRequestWithContext(ctx, "POST", dt.cst.ts.URL, pr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:11:57 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  6. src/net/http/transport_test.go

    				c.Transport.(*Transport).DisableKeepAlives = tc.disableKeepAlives
    				req, err := NewRequest("GET", ts.URL, nil)
    				if err != nil {
    					t.Fatal(err)
    				}
    				count := 0
    				trace := &httptrace.ClientTrace{
    					WroteHeaderField: func(key string, field []string) {
    						if key != "Connection" {
    							return
    						}
    						if httpguts.HeaderValuesContainsToken(field, "close") {
    							count += 1
    						}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 192.6K bytes
    - Viewed (0)
  7. src/net/http/httputil/reverseproxy.go

    // sends it to another server, proxying the response back to the
    // client.
    //
    // 1xx responses are forwarded to the client if the underlying
    // transport supports ClientTrace.Got1xxResponse.
    type ReverseProxy struct {
    	// Rewrite must be a function which modifies
    	// the request into a new request to be sent
    	// using Transport. Its response is then copied
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 23:37:42 UTC 2024
    - 24.9K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/server/filters/timeout_test.go

    	newServerRequest := func(tr *panicOnNonReuseTransport) *http.Request {
    		req, _ := http.NewRequest("GET", fmt.Sprintf("https://127.0.0.1:%d", ts.Listener.Addr().(*net.TCPAddr).Port), nil)
    		trace := &httptrace.ClientTrace{
    			GotConn: tr.GotConn,
    		}
    		return req.WithContext(httptrace.WithClientTrace(req.Context(), trace))
    	}
    
    	// client
    	clientCACertPool := x509.NewCertPool()
    	clientCACertPool.AppendCertsFromPEM(tsCrt)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 26 16:28:45 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  9. src/net/http/transport.go

    // exception is HTTP status code 101 (Switching Protocols), which is
    // considered a terminal status and returned by [Transport.RoundTrip]. To see the
    // ignored 1xx responses, use the httptrace trace package's
    // ClientTrace.Got1xxResponse.
    //
    // Transport only retries a request upon encountering a network error
    // if the connection has been already been used successfully and if the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 06 21:59:21 UTC 2024
    - 91K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    	},
    	"net/http/httptrace": {
    		{"ClientTrace", Type, 7},
    		{"ClientTrace.ConnectDone", Field, 7},
    		{"ClientTrace.ConnectStart", Field, 7},
    		{"ClientTrace.DNSDone", Field, 7},
    		{"ClientTrace.DNSStart", Field, 7},
    		{"ClientTrace.GetConn", Field, 7},
    		{"ClientTrace.Got100Continue", Field, 7},
    		{"ClientTrace.Got1xxResponse", Field, 11},
    		{"ClientTrace.GotConn", Field, 7},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
Back to top