Documentation
¶
Index ¶
- func FilterVMSizeOfferedByLocation(vmSizes []string, location string) ([]string, error)
- func GetImage(req ImageRequest) (*armcompute.CommunityGalleryImagesClientGetResponse, error)
- func IsImageOffered(req ImageRequest) bool
- func IsVMSizeOfferedByLocation(vmSize, location string) (bool, error)
- func SkuG2Support(location string, publisher string, offer string, sku string) (string, error)
- type BestSpotChoiceRequest
- type BestSpotChoiceResponse
- type ComputeSelector
- type EvictionRate
- type ImageReference
- type ImageRequest
- type OSType
- type SpotSelector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterVMSizeOfferedByLocation ¶ added in v0.8.2
Get InstanceTypes offerings on current location
func GetImage ¶
func GetImage(req ImageRequest) (*armcompute.CommunityGalleryImagesClientGetResponse, error)
func IsImageOffered ¶
func IsImageOffered(req ImageRequest) bool
func IsVMSizeOfferedByLocation ¶ added in v0.8.2
Types ¶
type BestSpotChoiceRequest ¶ added in v0.9.5
type BestSpotChoiceRequest struct { VMTypes []string OSType string EvictionRateTolerance EvictionRate ImageRef ImageReference ExcludedRegions []string }
type BestSpotChoiceResponse ¶ added in v0.9.5
type BestSpotChoiceResponse struct { VMType string `json:"skuName"` Location string `json:"location"` Price float64 `json:"latestSpotPriceUSD"` EvictionRate string `json:"evictionRate"` }
func GetBestSpotChoice ¶ added in v0.9.5
func GetBestSpotChoice(r BestSpotChoiceRequest) (*BestSpotChoiceResponse, error)
This function will return the best spot option
type ComputeSelector ¶ added in v0.9.5
type ComputeSelector struct{}
func NewComputeSelector ¶ added in v0.9.5
func NewComputeSelector() *ComputeSelector
func (*ComputeSelector) Select ¶ added in v0.9.5
func (c *ComputeSelector) Select( args *cr.ComputeRequestArgs) ([]string, error)
type EvictionRate ¶ added in v0.9.5
type EvictionRate int
const ( Lowest EvictionRate = iota Low Medium High Highest DefaultEvictionRate = Lowest )
type ImageReference ¶
type ImageReference struct { Publisher string Offer string Sku string // community gallery image ID ID string }
func GetImageRef ¶
func GetImageRef(osTarget OSType, arch string, version string) (*ImageReference, error)
version should came in format X.Y (major.minor)
type ImageRequest ¶
type ImageRequest struct { Region string ImageReference }
type SpotSelector ¶ added in v0.9.5
type SpotSelector struct{}
func NewSpotSelector ¶ added in v0.9.5
func NewSpotSelector() *SpotSelector
func (*SpotSelector) Select ¶ added in v0.9.5
func (c *SpotSelector) Select( args *spotTypes.SpotRequestArgs) (*spotTypes.SpotResults, error)
Click to show internal directories.
Click to hide internal directories.