Init .
(_ context.Context, repo *cache.RepoCache, conf core.Configuration)
| 61 | |
| 62 | // Init . |
| 63 | func (ge *githubExporter) Init(_ context.Context, repo *cache.RepoCache, conf core.Configuration) error { |
| 64 | ge.conf = conf |
| 65 | ge.identityClient = make(map[entity.Id]*rateLimitHandlerClient) |
| 66 | ge.cachedOperationIDs = make(map[entity.Id]string) |
| 67 | ge.cachedLabels = make(map[string]string) |
| 68 | |
| 69 | // preload all clients |
| 70 | err := ge.cacheAllClient(repo) |
| 71 | if err != nil { |
| 72 | return err |
| 73 | } |
| 74 | |
| 75 | return nil |
| 76 | } |
| 77 | |
| 78 | func (ge *githubExporter) cacheAllClient(repo *cache.RepoCache) error { |
| 79 | creds, err := auth.List(repo, auth.WithTarget(target), auth.WithKind(auth.KindToken)) |