github_ratelimit

package
v2.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2025 License: MIT Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(base http.RoundTripper, opts ...any) http.RoundTripper

New creates a combined limiter by stacking a SecondaryRateLimiter on top of a PrimaryRateLimiterOption. It accepts options of both types and creates the RoundTrippers. Check out options.go @ github_primary_ratelimit / github_secondary_ratelimit for available options.

func NewClient added in v2.0.2

func NewClient(base http.RoundTripper, opts ...any) *http.Client

NewClient creates a new HTTP client with the combined rate limiter.

func WithOverrideConfig

func WithOverrideConfig(ctx context.Context, opts ...any) context.Context

WithOverrideConfig adds config overrides to the context. The overrides are applied on top of the existing config. Allows for request-specific overrides. It accepts options of both types and overrides accordingly.

Types

type PrimaryRateLimiter

type PrimaryRateLimiter = github_primary_ratelimit.PrimaryRateLimiter

func NewPrimaryLimiter

func NewPrimaryLimiter(base http.RoundTripper, opts ...PrimaryRateLimiterOption) *PrimaryRateLimiter

NewPrimaryLimiter is an alias for github_primary_ratelimit.New. Check out options.go @ github_primary_ratelimit for available options.

type PrimaryRateLimiterOption

type PrimaryRateLimiterOption = github_primary_ratelimit.Option

type SecondaryRateLimiter

type SecondaryRateLimiter = github_secondary_ratelimit.SecondaryRateLimiter

func NewSecondaryLimiter

func NewSecondaryLimiter(base http.RoundTripper, opts ...SecondaryRateLimiterOption) *SecondaryRateLimiter

NewSecondaryLimiter is an alias for github_secondary_ratelimit.New. Check out options.go @ github_secondary_ratelimit for available options.

type SecondaryRateLimiterOption

type SecondaryRateLimiterOption = github_secondary_ratelimit.Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL