IsSpecAvailable reports whether a concrete spec is available. Availability fails open when the API did not provide availability data.
(gpuType string, gpuCount int)
| 70 | // IsSpecAvailable reports whether a concrete spec is available. Availability |
| 71 | // fails open when the API did not provide availability data. |
| 72 | func (s *SpecStore) IsSpecAvailable(gpuType string, gpuCount int) bool { |
| 73 | if s == nil || len(s.availability) == 0 { |
| 74 | return true |
| 75 | } |
| 76 | status, ok := s.availability[publicConfigKey(gpuType, gpuCount)] |
| 77 | if !ok { |
| 78 | return true |
| 79 | } |
| 80 | return status == "available" |
| 81 | } |
| 82 | |
| 83 | // gpuDisplayOrder defines the canonical display ordering for GPU types |
| 84 | // (ascending by cost/performance). |
no test coverage detected