GetSpecs retrieves GPU spec configurations from the API.
()
| 346 | |
| 347 | // GetSpecs retrieves GPU spec configurations from the API. |
| 348 | func (c *Client) GetSpecs() (map[string]GpuSpecConfig, error) { |
| 349 | var result struct { |
| 350 | Specs map[string]GpuSpecConfig `json:"specs"` |
| 351 | } |
| 352 | if err := c.doRequest(context.Background(), "GET", "/v2/specs", nil, &result); err != nil { |
| 353 | return nil, err |
| 354 | } |
| 355 | return result.Specs, nil |
| 356 | } |
| 357 | |
| 358 | // GetAvailability retrieves per-spec GPU availability from the API. |
| 359 | func (c *Client) GetAvailability() (*GPUAvailabilityResponse, error) { |
no test coverage detected