Documentation ¶
Index ¶
- Variables
- func CreateGithubRepoClient(ctx context.Context, client *github.Client, graphClient *githubv4.Client) clients.RepoClient
- func MakeGitHubTransport(innerTransport http.RoundTripper, accessTokens []string) http.RoundTripper
- type Client
- func (client *Client) Close() error
- func (client *Client) GetDefaultBranch() (clients.BranchRef, error)
- func (client *Client) GetFileContent(filename string) ([]byte, error)
- func (client *Client) InitRepo(owner, repoName string) error
- func (client *Client) ListFiles(predicate func(string) (bool, error)) ([]string, error)
- func (client *Client) ListMergedPRs() ([]clients.PullRequest, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // RemainingTokens measures the remaining number of API tokens. RemainingTokens = stats.Int64("RemainingTokens", "Measures the remaining count of API tokens", stats.UnitDimensionless) // TokenIndex is the tag key for specifying a unique token. TokenIndex = tag.MustNewKey("tokenIndex") // ResourceType specifies the type of GitHub resource. ResourceType = tag.MustNewKey("resourceType") // GithubTokens tracks the usage/remaining stats per token per resource-type. GithubTokens = view.View{ Name: "GithubTokens", Description: "Token usage/remaining stats for Github API tokens", Measure: RemainingTokens, TagKeys: []tag.Key{TokenIndex, ResourceType}, Aggregation: view.LastValue(), } )
Functions ¶
func CreateGithubRepoClient ¶
func MakeGitHubTransport ¶
func MakeGitHubTransport(innerTransport http.RoundTripper, accessTokens []string) http.RoundTripper
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetDefaultBranch ¶
func (*Client) GetFileContent ¶
func (*Client) ListMergedPRs ¶
func (client *Client) ListMergedPRs() ([]clients.PullRequest, error)
Click to show internal directories.
Click to hide internal directories.