Merge pull request #6314 from bparees/tokenbucket

add a blocking accept method to RateLimiter
This commit is contained in:
Prashanth B
2015-04-02 16:01:17 -07:00
3 changed files with 22 additions and 0 deletions

View File

@@ -36,6 +36,7 @@ type fakeRL bool
func (fakeRL) Stop() {}
func (f fakeRL) CanAccept() bool { return bool(f) }
func (f fakeRL) Accept() {}
func expectHTTP(url string, code int, t *testing.T) {
r, err := http.Get(url)