roundtripper

package
v2.2.8 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package roundtripper has implementations of http.RoundTripper useful to clients.RepoClient.

Index

Constants

View Source
const (

	// GithubAppKeyPath is the path to file for GitHub App key.
	GithubAppKeyPath = "GITHUB_APP_KEY_PATH"
	// GithubAppID is the app ID for the GitHub App.
	GithubAppID = "GITHUB_APP_ID"
	// GithubAppInstallationID is the installation ID for the GitHub App.
	GithubAppInstallationID = "GITHUB_APP_INSTALLATION_ID"
)

Variables

View Source
var GithubAuthTokens = []string{"GITHUB_AUTH_TOKEN", "GITHUB_TOKEN", "GH_TOKEN", "GH_AUTH_TOKEN"}

GithubAuthTokens are for making requests to GiHub's API.

Functions

func MakeCensusTransport

func MakeCensusTransport(innerTransport http.RoundTripper) http.RoundTripper

MakeCensusTransport wraps input Roundtripper with monitoring logic.

func MakeGitHubTransport

func MakeGitHubTransport(innerTransport http.RoundTripper, accessTokens []string) http.RoundTripper

MakeGitHubTransport wraps input RoundTripper with GitHub authorization logic.

func MakeRateLimitedTransport

func MakeRateLimitedTransport(innerTransport http.RoundTripper, logger *zap.SugaredLogger) http.RoundTripper

MakeRateLimitedTransport returns a RoundTripper which rate limits GitHub requests.

func NewTransport

func NewTransport(ctx context.Context, logger *zap.SugaredLogger) http.RoundTripper

NewTransport returns a configured http.Transport for use with GitHub.

Types

This section is empty.

Jump to

Keyboard shortcuts

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