Documentation
¶
Index ¶
- Variables
- func Authorize(ctx context.Context, request *http.Request, origin string, resolver *Resolver) error
- func HTTPClient(base *http.Client, origin string) *http.Client
- func IsAPIOrigin(destination *url.URL, origin string) bool
- func IsAPIOriginURL(destination, origin string) bool
- func RedactError(request *http.Request, err error) error
- func RedactResponse(response *http.Response, message string) string
- func ValidateCredentialTransport(destination *url.URL) error
- type RateLimitError
- type RateLimitGate
- type Resolver
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrRateLimited = errors.New("github: rate limit exceeded")
Functions ¶
func IsAPIOriginURL ¶
func ValidateCredentialTransport ¶
ValidateCredentialTransport preserves local HTTP registries without exposing credentials remotely.
Types ¶
type RateLimitError ¶
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string
func (*RateLimitError) Unwrap ¶
func (e *RateLimitError) Unwrap() error
type RateLimitGate ¶
type RateLimitGate struct {
// contains filtered or unexported fields
}
RateLimitGate retains upstream deadlines across transient clients owned by one service. Each configured API origin has an independent quota boundary.
func (*RateLimitGate) Check ¶
func (g *RateLimitGate) Check(origin string, now time.Time) *RateLimitError
func (*RateLimitGate) Record ¶
func (g *RateLimitGate) Record(origin string, limited *RateLimitError)
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver keeps GitHub CLI credentials in memory within its owner's lifetime and environment.
func NewResolver ¶
Click to show internal directories.
Click to hide internal directories.