GetWithRetry makes a GET request with retry logic and timeout.
(path string, result *map[string]interface{}, maxRetries int)
| 204 | |
| 205 | // GetWithRetry makes a GET request with retry logic and timeout. |
| 206 | func (c *Client) GetWithRetry(path string, result *map[string]interface{}, maxRetries int) error { |
| 207 | ctx, cancel := context.WithTimeout(context.Background(), DefaultAPITimeout) |
| 208 | defer cancel() |
| 209 | |
| 210 | c.logger.Debug("API GET with retry: %s", path) |
| 211 | |
| 212 | return c.httpClient.GetWithRetry(ctx, path, result, maxRetries) |
| 213 | } |
| 214 | |
| 215 | // Version gets the Proxmox API version. |
| 216 | func (c *Client) Version(ctx context.Context) (float64, error) { |