- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for CancelRequest (0.28 sec)
-
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/command_headers.go
c.Headers[kubectlCommandHeader] = strings.Join(cmdStrs, " ") } } // CancelRequest is propagated to the Delegate RoundTripper within // if the wrapped RoundTripper implements this function. func (c *CommandHeaderRoundTripper) CancelRequest(req *http.Request) { type canceler interface { CancelRequest(*http.Request) } // If possible, call "CancelRequest" on the wrapped Delegate RoundTripper. if cr, ok := c.Delegate.(canceler); ok {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Jul 26 17:14:05 UTC 2022 - 3.2K bytes - Viewed (0) -
staging/src/k8s.io/cli-runtime/pkg/genericclioptions/command_headers_test.go
currCmd = cmd } return currCmd } // Tests that the CancelRequest function is propogated to the wrapped Delegate // RoundTripper; but only if the Delegate implements the CancelRequest function. func TestCancelRequest(t *testing.T) { tests := map[string]struct { delegate http.RoundTripper cancelled bool }{ "CancelRequest propagated to delegate": { delegate: &cancellableRoundTripper{},
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Aug 20 20:34:02 UTC 2021 - 4.6K bytes - Viewed (0) -
src/net/http/client.go
// as if the Request's Context ended. // // For compatibility, the Client will also use the deprecated // CancelRequest method on Transport if found. New // RoundTripper implementations should use the Request's Context // for cancellation instead of implementing CancelRequest. Timeout time.Duration } // DefaultClient is the default [Client] and is used by [Get], [Head], and [Post].
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 06:06:11 UTC 2024 - 33.7K bytes - Viewed (0) -
src/net/http/transport.go
} t.reqCanceler[req] = cancel t.reqMu.Unlock() return cancel } // CancelRequest cancels an in-flight request by closing its connection. // CancelRequest should only be called after [Transport.RoundTrip] has returned. // // Deprecated: Use [Request.WithContext] to create a request with a // cancelable context instead. CancelRequest cannot cancel HTTP/2 // requests. This may become a no-op in a future release of Go.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 91K bytes - Viewed (0) -
src/net/http/transport_test.go
} // runCancelTestTransport uses Transport.CancelRequest. func runCancelTestTransport(t *testing.T, mode testMode, f func(t *testing.T, test cancelTest)) { t.Run("TransportCancel", func(t *testing.T) { f(t, cancelTest{ mode: mode, newReq: func(req *Request) *Request { return req }, cancel: func(tr *Transport, req *Request) { tr.CancelRequest(req) },
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jun 06 21:59:21 UTC 2024 - 192.6K bytes - Viewed (0) -
src/net/http/httputil/reverseproxy_test.go
defer frontend.Close() frontendClient := frontend.Client() getReq, _ := http.NewRequest("GET", frontend.URL, nil) go func() { <-reqInFlight frontendClient.Transport.(*http.Transport).CancelRequest(getReq) }() res, err := frontendClient.Do(getReq) if res != nil { t.Errorf("got response %v; want nil", res.Status) } if err == nil { // This should be an error like:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 54.6K bytes - Viewed (0) -
src/net/http/h2_bundle.go
default: waitDone() return nil, cs.abortErr } case <-ctx.Done(): err := ctx.Err() cs.abortStream(err) return nil, cancelRequest(cs, err) case <-cs.reqCancel: cs.abortStream(http2errRequestCanceled) return nil, cancelRequest(cs, http2errRequestCanceled) } } } // doRequest runs for the duration of the request lifetime. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 364.1K bytes - Viewed (0) -
src/net/http/serve_test.go
// ReadCloser, that will result in concurrent calls to Close (and possibly a // Read concurrent with a Close). if mode == http2Mode { close(cancel) } else { proxy.c.Transport.(*Transport).CancelRequest(req2) } rw.Write([]byte("OK")) })) defer proxy.close() req, _ := NewRequest("POST", proxy.ts.URL, io.LimitReader(neverEnding('a'), bodySize)) res, err := proxy.c.Do(req)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jun 07 17:57:01 UTC 2024 - 202K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"(*Server).Serve", Method, 0}, {"(*Server).ServeTLS", Method, 9}, {"(*Server).SetKeepAlivesEnabled", Method, 3}, {"(*Server).Shutdown", Method, 8}, {"(*Transport).CancelRequest", Method, 1}, {"(*Transport).Clone", Method, 13}, {"(*Transport).CloseIdleConnections", Method, 0}, {"(*Transport).RegisterProtocol", Method, 0}, {"(*Transport).RoundTrip", Method, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
api/go1.16.txt
pkg image, var ZR //deprecated pkg image/jpeg, type Reader //deprecated pkg net, type Dialer struct, Cancel //deprecated pkg net, type Dialer struct, DualStack //deprecated pkg net/http, method (*Transport) CancelRequest //deprecated pkg net/http, type CloseNotifier //deprecated pkg net/http, type ProtocolError //deprecated pkg net/http, type Request struct, Cancel //deprecated pkg net/http, type Transport struct, Dial //deprecated
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 02 16:30:41 UTC 2022 - 479.2K bytes - Viewed (0)