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

Method FetchTools

runner/pool/pool.go:2328–2345  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2326}
2327
2328func (r *basePoolManager) FetchTools() ([]commonParams.RunnerApplicationDownload, error) {
2329 tools, ghResp, err := r.ghcli.ListEntityRunnerApplicationDownloads(r.ctx)
2330 if err != nil {
2331 if ghResp != nil && ghResp.StatusCode == http.StatusUnauthorized {
2332 return nil, runnerErrors.NewUnauthorizedError("error fetching tools")
2333 }
2334 return nil, fmt.Errorf("error fetching runner tools: %w", err)
2335 }
2336
2337 ret := []commonParams.RunnerApplicationDownload{}
2338 for _, tool := range tools {
2339 if tool == nil {
2340 continue
2341 }
2342 ret = append(ret, commonParams.RunnerApplicationDownload(*tool))
2343 }
2344 return ret, nil
2345}
2346
2347func (r *basePoolManager) GetWebhookInfo(ctx context.Context) (params.HookInfo, error) {
2348 allHooks, err := r.listHooks(ctx)

Callers 1

updateToolsMethod · 0.80

Tested by

no test coverage detected