func TestNewRequestSetsAccept(t *testing.T) { … }
func clientForFunc(fn clientFunc) *http.Client { … }
type clientFunc …
func (f clientFunc) RoundTrip(req *http.Request) (*http.Response, error) { … }
func TestRequestSetsHeaders(t *testing.T) { … }
func TestRequestWithErrorWontChange(t *testing.T) { … }
func TestRequestPreservesBaseTrailingSlash(t *testing.T) { … }
func TestRequestAbsPathPreservesTrailingSlash(t *testing.T) { … }
func TestRequestAbsPathJoins(t *testing.T) { … }
func TestRequestSetsNamespace(t *testing.T) { … }
func TestRequestOrdersNamespaceInPath(t *testing.T) { … }
func TestRequestOrdersSubResource(t *testing.T) { … }
func TestRequestSetTwiceError(t *testing.T) { … }
func TestInvalidSegments(t *testing.T) { … }
func TestRequestParam(t *testing.T) { … }
func TestRequestVersionedParams(t *testing.T) { … }
func TestRequestVersionedParamsFromListOptions(t *testing.T) { … }
func TestRequestVersionedParamsWithInvalidScheme(t *testing.T) { … }
func TestRequestError(t *testing.T) { … }
func TestRequestURI(t *testing.T) { … }
type NotAnAPIObject …
func (obj NotAnAPIObject) GroupVersionKind() *schema.GroupVersionKind { … }
func (obj NotAnAPIObject) SetGroupVersionKind(gvk *schema.GroupVersionKind) { … }
func defaultContentConfig() ClientContentConfig { … }
func TestRequestBody(t *testing.T) { … }
func TestResultIntoWithErrReturnsErr(t *testing.T) { … }
func TestResultIntoWithNoBodyReturnsErr(t *testing.T) { … }
func TestURLTemplate(t *testing.T) { … }
func TestTransformResponse(t *testing.T) { … }
type renegotiator …
func (r *renegotiator) Decoder(contentType string, params map[string]string) (runtime.Decoder, error) { … }
func (r *renegotiator) Encoder(contentType string, params map[string]string) (runtime.Encoder, error) { … }
func (r *renegotiator) StreamDecoder(contentType string, params map[string]string) (runtime.Decoder, runtime.Serializer, runtime.Framer, error) { … }
func TestTransformResponseNegotiate(t *testing.T) { … }
func TestTransformUnstructuredError(t *testing.T) { … }
func TestRequestWatch(t *testing.T) { … }
func TestRequestStream(t *testing.T) { … }
func TestRequestDo(t *testing.T) { … }
func TestDoRequestNewWay(t *testing.T) { … }
func TestBackoffLifecycle(t *testing.T) { … }
type testBackoffManager …
func (b *testBackoffManager) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { … }
func (b *testBackoffManager) CalculateBackoff(actualUrl *url.URL) time.Duration { … }
func (b *testBackoffManager) Sleep(d time.Duration) { … }
func TestCheckRetryClosesBody(t *testing.T) { … }
func TestConnectionResetByPeerIsRetried(t *testing.T) { … }
func TestCheckRetryHandles429And5xx(t *testing.T) { … }
func BenchmarkCheckRetryClosesBody(b *testing.B) { … }
func TestDoRequestNewWayReader(t *testing.T) { … }
func TestDoRequestNewWayObj(t *testing.T) { … }
func TestDoRequestNewWayFile(t *testing.T) { … }
func TestWasCreated(t *testing.T) { … }
func TestVerbs(t *testing.T) { … }
func TestAbsPath(t *testing.T) { … }
func TestUnacceptableParamNames(t *testing.T) { … }
func TestBody(t *testing.T) { … }
func TestWatch(t *testing.T) { … }
func TestWatchNonDefaultContentType(t *testing.T) { … }
func TestWatchUnknownContentType(t *testing.T) { … }
func TestStream(t *testing.T) { … }
func testRESTClientWithConfig(t testing.TB, srv *httptest.Server, contentConfig ClientContentConfig) *RESTClient { … }
func testRESTClient(t testing.TB, srv *httptest.Server) *RESTClient { … }
func TestDoContext(t *testing.T) { … }
func buildString(length int) string { … }
func init() { … }
func TestTruncateBody(t *testing.T) { … }
func defaultResourcePathWithPrefix(prefix, resource, namespace, name string) string { … }
func TestRequestPreflightCheck(t *testing.T) { … }
func TestThrottledLogger(t *testing.T) { … }
func TestRequestMaxRetries(t *testing.T) { … }
type responseErr …
type seek …
type count …
func (c *count) close() { … }
func (c *count) getCloseCount() int { … }
type readTracker …
func (r *readTracker) Seek(offset int64, whence int) (int64, error) { … }
func (r *readTracker) Read(p []byte) (n int, err error) { … }
func (r *readTracker) Close() error { … }
func newReadTracker(count *count) *readTracker { … }
func newCount() *count { … }
type readSeeker …
func (rs readSeeker) Read([]byte) (int, error) { … }
func (rs readSeeker) Seek(int64, int) (int64, error) { … }
func unWrap(err error) error { … }
type noSleepBackOff …
func (n *noSleepBackOff) Sleep(d time.Duration) { … }
func TestRequestWithRetry(t *testing.T) { … }
func TestRequestDoWithRetry(t *testing.T) { … }
func TestRequestDoRawWithRetry(t *testing.T) { … }
func TestRequestStreamWithRetry(t *testing.T) { … }
func TestRequestWatchWithRetry(t *testing.T) { … }
func TestRequestDoRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { … }
func TestRequestStreamRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { … }
func TestRequestWatchRetryWithRateLimiterBackoffAndMetrics(t *testing.T) { … }
func TestRequestDoWithRetryInvokeOrder(t *testing.T) { … }
func TestRequestStreamWithRetryInvokeOrder(t *testing.T) { … }
func TestRequestWatchWithRetryInvokeOrder(t *testing.T) { … }
func TestRequestWatchWithWrapPreviousError(t *testing.T) { … }
func TestRequestDoWithWrapPreviousError(t *testing.T) { … }
func testRequestWithRetry(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { … }
type retryTestKeyType …
const retryTestKey …
type withRateLimiterBackoffManagerAndMetrics …
func (lb *withRateLimiterBackoffManagerAndMetrics) Wait(ctx context.Context) error { … }
func (lb *withRateLimiterBackoffManagerAndMetrics) CalculateBackoff(actualUrl *url.URL) time.Duration { … }
func (lb *withRateLimiterBackoffManagerAndMetrics) UpdateBackoff(actualUrl *url.URL, err error, responseCode int) { … }
func (lb *withRateLimiterBackoffManagerAndMetrics) Sleep(d time.Duration) { … }
func (lb *withRateLimiterBackoffManagerAndMetrics) Increment(ctx context.Context, code, _, _ string) { … }
func (lb *withRateLimiterBackoffManagerAndMetrics) IncrementRetry(ctx context.Context, code, _, _ string) { … }
func (lb *withRateLimiterBackoffManagerAndMetrics) Do() { … }
func testRetryWithRateLimiterBackoffAndMetrics(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { … }
type retryInterceptor …
func (ri *retryInterceptor) IsNextRetry(ctx context.Context, restReq *Request, httpReq *http.Request, resp *http.Response, err error, f IsRetryableErrorFunc) bool { … }
func (ri *retryInterceptor) Before(ctx context.Context, request *Request) error { … }
func (ri *retryInterceptor) After(ctx context.Context, request *Request, resp *http.Response, err error) { … }
func (ri *retryInterceptor) Do() { … }
func testWithRetryInvokeOrder(t *testing.T, key string, doFunc func(ctx context.Context, r *Request)) { … }
func testWithWrapPreviousError(t *testing.T, doFunc func(ctx context.Context, r *Request) error) { … }
func TestReuseRequest(t *testing.T) { … }
func TestHTTP1DoNotReuseRequestAfterTimeout(t *testing.T) { … }
func TestTransportConcurrency(t *testing.T) { … }
func TestRetryableConditions(t *testing.T) { … }
func TestRequestConcurrencyWithRetry(t *testing.T) { … }
func TestRequestLogging(t *testing.T) { … }