Enforced rate limits?

Skip to first unread message

Mark McDonald

Jun 15, 2015, 3:14:43 AM6/15/15
to go-g...@googlegroups.com

I've had a quick look around the code for this (fantastic) library and have seen this comment, which leads me to believe that there is rate limit enforcement within the client library in some form:

// Client returns an *http.Client that makes requests which are subject to the // rate limit of your OAuth application.
func (t *UnauthenticatedRateLimitedTransport) Client() *http.Client {
return &http.Client{Transport: t}

Except that I can't find any code that seems to actually enforce it.

Is this a real, implemented feature? Or is the comment incorrect/ambiguous?

To clarify, by rate limit enforcement, I mean that the library itself honours the rate limit in some way that enables me to fire off loads of requests with reckless abandon.


Will Norris

Jun 15, 2015, 4:56:46 AM6/15/15
to Mark McDonald, go-g...@googlegroups.com
No, it doesn't do any sort of automated throttling of requests.  In hindsight, perhaps that wasn't named as well as it could have been.

Jason Hall tried implementing this a few months back, but we both agreed that the library itself probably shouldn't be doing this, rather the application should.  See discussion on google/go-github#152 and google/go-github#153.

You received this message because you are subscribed to the Google Groups "go-github" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-github+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark McDonald

Jun 15, 2015, 2:09:07 PM6/15/15
to Will Norris, go-g...@googlegroups.com

That makes sense, thanks Will.

Reply all
Reply to author
0 new messages