Documentation ¶
Overview ¶
Package roundtripper has implementations of http.RoundTripper useful to clients.RepoClient.
Index ¶
- Constants
- Variables
- func MakeCensusTransport(innerTransport http.RoundTripper) http.RoundTripper
- func MakeGitHubTransport(innerTransport http.RoundTripper, accessTokens []string) http.RoundTripper
- func MakeRateLimitedTransport(innerTransport http.RoundTripper, logger *zap.SugaredLogger) http.RoundTripper
- func NewTransport(ctx context.Context, logger *zap.SugaredLogger) http.RoundTripper
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.
Click to show internal directories.
Click to hide internal directories.