()
| 522 | } |
| 523 | |
| 524 | func (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. |