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

Method RemoveRunner

util/github/scalesets/runners.go:167–189  ·  view source on GitHub ↗
(ctx context.Context, runnerID int64)

Source from the content-addressed store, hash-verified

165}
166
167func (s *ScaleSetClient) RemoveRunner(ctx context.Context, runnerID int64) (err error) {
168 s.recordOperation("RemoveRunner")
169 defer func() {
170 if err != nil {
171 s.recordFailedOperation("RemoveRunner")
172 }
173 }()
174
175 path := fmt.Sprintf("%s/%d", runnerEndpoint, runnerID)
176
177 req, err := s.newActionsRequest(ctx, http.MethodDelete, path, nil)
178 if err != nil {
179 return fmt.Errorf("failed to construct request: %w", err)
180 }
181
182 resp, err := s.Do(req)
183 if err != nil {
184 return fmt.Errorf("request failed for %s: %w", req.URL.String(), err)
185 }
186
187 resp.Body.Close()
188 return nil
189}

Callers 7

GhRepoRunnersCleanupFunction · 0.45
StartMethod · 0.45
handleScaleUpMethod · 0.45
handleScaleDownMethod · 0.45
RemoveEntityRunnerMethod · 0.45

Calls 6

recordOperationMethod · 0.95
recordFailedOperationMethod · 0.95
newActionsRequestMethod · 0.95
DoMethod · 0.95
CloseMethod · 0.65
StringMethod · 0.45

Tested by

no test coverage detected