- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for ClientTrace (0.24 sec)
-
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) -
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) -
src/net/http/httptrace/example_test.go
package httptrace_test import ( "fmt" "log" "net/http" "net/http/httptrace" ) func Example() { req, _ := http.NewRequest("GET", "http://example.com", nil) trace := &httptrace.ClientTrace{ GotConn: func(connInfo httptrace.GotConnInfo) { fmt.Printf("Got Conn: %+v\n", connInfo) }, DNSDone: func(dnsInfo httptrace.DNSDoneInfo) { fmt.Printf("DNS Info: %+v\n", dnsInfo) }, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 20 05:11:45 UTC 2016 - 712 bytes - Viewed (0) -
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) -
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) -
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)