gitlablimit

package
v3.0.0-dev.10 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package gitlablimit reads GitLab's rate-limit figures off an answer, for every package that reaches a GitLab instance: the gitlab client and the creds package's OAuth endpoints, whose answers carry them too (https://docs.gitlab.com/administration/settings/user_and_ip_rate_limits/#response-headers).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pool

func Pool(header http.Header) (name string, limit int)

Pool names the throttle an answer reports and its whole limit, the most restrictive one the request counted against: on gitlab.com throttle_authenticated_api, 2000 a minute, for most routes and burst_traffic_per_user_free_plan, 100 a minute, for the project listings (measured 2026-10-20).

func Signal

func Signal(header http.Header) (remaining int, reset time.Time, ok bool)

Signal reads this product's budget signal, which rides every answer, a refusal included: the remaining figure of the throttle the request counted against, ok false where the answer carries no readable one, and the instant its window renews, as epoch seconds, whatever ok reads; the zero time where the answer carries no reset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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