MCPcopy Index your code
hub / github.com/rilldata/rill / githubClient

Struct githubClient

admin/github.go:55–72  ·  view source on GitHub ↗

githubClient implements the Github interface.

Source from the content-addressed store, hash-verified

53
54// githubClient implements the Github interface.
55type githubClient struct {
56 appID int64
57 appPrivateKey string
58 appClient *github.Client
59 // appTransport is the transport used to create the app client.
60 // It can used across multiple installation clients to reuse TCP connections to Github.
61 appTransport *ghinstallation.AppsTransport
62 managedAcct string
63
64 // managedOrgInstallationID is usually populated when the client is created.
65 // But we do not return an error if there is any error in fetching the installation ID.
66 // This is to let admin server start even if there is an issue with Github service.
67 managedOrgInstallationID int64
68 managedOrgFetchError error
69
70 cacheMu sync.Mutex
71 installationCache *simplelru.LRU
72}
73
74// NewGithub returns a new client for connecting to Github.
75func NewGithub(ctx context.Context, appID int64, appPrivateKey, githubManagedAcct string, logger *zap.Logger) (Github, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected