(ctx context.Context, runnerID int64)
| 165 | } |
| 166 | |
| 167 | func (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 | } |
no test coverage detected