MCPcopy
hub / github.com/kubernetes/client-go / tryThrottle

Method tryThrottle

rest/request.go:524–532  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

522}
523
524func (r *Request) tryThrottle() {
525 now := time.Now()
526 if r.throttle != nil {
527 r.throttle.Accept()
528 }
529 if latency := time.Since(now); latency > longThrottleLatency {
530 klog.V(4).Infof("Throttling request took %v, request: %s:%s", latency, r.verb, r.URL().String())
531 }
532}
533
534// Watch attempts to begin watching the requested location.
535// Returns a watch.Interface, or an error.

Callers 4

StreamMethod · 0.95
requestMethod · 0.95
DoMethod · 0.95
DoRawMethod · 0.95

Calls 4

URLMethod · 0.95
NowMethod · 0.65
AcceptMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected