mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-30 13:23:28 +00:00
Merge pull request #111097 from saltbo/fix-thethe-typo
fix: update the typo code comment Kubernetes-commit: f3654386abbb838c42286250ef52a73c52ab1812
This commit is contained in:
commit
79a582f2eb
4
go.mod
4
go.mod
@ -25,7 +25,7 @@ require (
|
||||
golang.org/x/time v0.0.0-20220210224613-90d013bbcef8
|
||||
google.golang.org/protobuf v1.27.1
|
||||
k8s.io/api v0.0.0-20220709052054-b9bd7327add9
|
||||
k8s.io/apimachinery v0.0.0-20220713051826-0897ed8d5be4
|
||||
k8s.io/apimachinery v0.0.0-20220714010307-51e28bce4230
|
||||
k8s.io/klog/v2 v2.70.1
|
||||
k8s.io/kube-openapi v0.0.0-20220627174259-011e075b9cb8
|
||||
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
|
||||
@ -62,5 +62,5 @@ require (
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20220709052054-b9bd7327add9
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220713051826-0897ed8d5be4
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20220714010307-51e28bce4230
|
||||
)
|
||||
|
4
go.sum
4
go.sum
@ -481,8 +481,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
|
||||
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.0.0-20220709052054-b9bd7327add9 h1:FEAp0lzAf22GNplJSRIT174/pN71JLVsgVQGdB5OPVo=
|
||||
k8s.io/api v0.0.0-20220709052054-b9bd7327add9/go.mod h1:mu5fbjml8u+WuYagoAcCQ+yMPxydoFY51dJq/r0+XtY=
|
||||
k8s.io/apimachinery v0.0.0-20220713051826-0897ed8d5be4 h1:kh78v75M4kX6pOs8MywC8OcEoM6zSsDw1eI4h+9Zm0k=
|
||||
k8s.io/apimachinery v0.0.0-20220713051826-0897ed8d5be4/go.mod h1:0qktsm8TIQ7Y3rLpUe4SLWy+3L6Su5aSoIQxgqO+4ks=
|
||||
k8s.io/apimachinery v0.0.0-20220714010307-51e28bce4230 h1:LooH+FjqTJcmtMoLbKLzsqFGn7UZD+0YAoE6V3ZmXuE=
|
||||
k8s.io/apimachinery v0.0.0-20220714010307-51e28bce4230/go.mod h1:0qktsm8TIQ7Y3rLpUe4SLWy+3L6Su5aSoIQxgqO+4ks=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
k8s.io/klog/v2 v2.70.1 h1:7aaoSdahviPmR+XkS7FyxlkkXs6tHISSG03RxleQAVQ=
|
||||
k8s.io/klog/v2 v2.70.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0=
|
||||
|
@ -710,7 +710,7 @@ func updateURLMetrics(ctx context.Context, req *Request, resp *http.Response, er
|
||||
if err != nil {
|
||||
metrics.RequestResult.Increment(ctx, "<error>", req.verb, url)
|
||||
} else {
|
||||
//Metrics for failure codes
|
||||
// Metrics for failure codes
|
||||
metrics.RequestResult.Increment(ctx, strconv.Itoa(resp.StatusCode), req.verb, url)
|
||||
}
|
||||
}
|
||||
@ -823,7 +823,7 @@ func (r *Request) newHTTPRequest(ctx context.Context) (*http.Request, error) {
|
||||
// fn at most once. It will return an error if a problem occurred prior to connecting to the
|
||||
// server - the provided function is responsible for handling server errors.
|
||||
func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Response)) error {
|
||||
//Metrics for total request latency
|
||||
// Metrics for total request latency
|
||||
start := time.Now()
|
||||
defer func() {
|
||||
metrics.RequestLatency.Observe(ctx, r.verb, *r.URL(), time.Since(start))
|
||||
@ -892,7 +892,7 @@ func (r *Request) request(ctx context.Context, fn func(*http.Request, *http.Resp
|
||||
done := func() bool {
|
||||
defer readAndCloseResponseBody(resp)
|
||||
|
||||
// if the the server returns an error in err, the response will be nil.
|
||||
// if the server returns an error in err, the response will be nil.
|
||||
f := func(req *http.Request, resp *http.Response) {
|
||||
if resp == nil {
|
||||
return
|
||||
|
@ -2564,7 +2564,7 @@ func TestRequestWatchWithRetry(t *testing.T) {
|
||||
testRequestWithRetry(t, "Watch", func(ctx context.Context, r *Request) {
|
||||
w, err := r.Watch(ctx)
|
||||
if err == nil {
|
||||
// in this test the the response body returned by the server is always empty,
|
||||
// in this test the response body returned by the server is always empty,
|
||||
// this will cause StreamWatcher.receive() to:
|
||||
// - return an io.EOF to indicate that the watch closed normally and
|
||||
// - then close the io.Reader
|
||||
|
Loading…
Reference in New Issue
Block a user