Documentation
¶
Index ¶
- Constants
- func AbuseRetryAfter(err error) time.Duration
- func CheckRateLimit(ctx context.Context, resp *github.Response) error
- func Deref(s *string) string
- func GetGitHubDeveloper(ctx context.Context, client *http.Client, username string) (*data.Developer, error)
- func GetLabels(labels []*github.Label) []string
- func GetUsernames(users ...*github.User) []string
- func MapUserToDeveloper(u *github.User) *data.Developer
- func ParseDate(t *time.Time) string
- func ParseUsers(body *string) []string
- func RateInfo(r *github.Rate) string
- func Trim(s *string) string
- type TokenPool
Constants ¶
View Source
const RateLimitThreshold = 10
Variables ¶
This section is empty.
Functions ¶
func AbuseRetryAfter ¶
AbuseRetryAfter returns the retry-after duration if the error is a secondary (abuse) rate limit error. Returns 0 if the error is not an abuse rate limit.
func GetGitHubDeveloper ¶
func GetUsernames ¶
func ParseUsers ¶
Types ¶
type TokenPool ¶
type TokenPool struct {
// contains filtered or unexported fields
}
TokenPool manages a pool of GitHub API tokens using round-robin selection. Safe for concurrent use. Works transparently with a single token.
func NewTokenPool ¶
NewTokenPool creates a pool from one or more tokens. Tokens can be passed individually or as a single comma-separated string.
Click to show internal directories.
Click to hide internal directories.