MCPcopy Create free account
hub / github.com/cloudbase/garm / GithubRunnerRegistrationToken

Method GithubRunnerRegistrationToken

runner/pool/pool.go:2317–2326  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2315}
2316
2317func (r *basePoolManager) GithubRunnerRegistrationToken() (string, error) {
2318 tk, ghResp, err := r.ghcli.CreateEntityRegistrationToken(r.ctx)
2319 if err != nil {
2320 if ghResp != nil && ghResp.StatusCode == http.StatusUnauthorized {
2321 return "", runnerErrors.NewUnauthorizedError("error fetching token")
2322 }
2323 return "", fmt.Errorf("error creating runner token: %w", err)
2324 }
2325 return *tk.Token, nil
2326}
2327
2328func (r *basePoolManager) FetchTools() ([]commonParams.RunnerApplicationDownload, error) {
2329 tools, ghResp, err := r.ghcli.ListEntityRunnerApplicationDownloads(r.ctx)

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected