spotprice

package
v0.6.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BestSpotChoiceRequest

type BestSpotChoiceRequest struct {
	VMTypes              []string
	OSType               string
	EvictioRateTolerance EvictionRate
}

type BestSpotChoiceResponse

type BestSpotChoiceResponse struct {
	VMType   string  `json:"skuName"`
	Location string  `json:"location"`
	Price    float64 `json:"latestSpotPriceUSD"`
}

func GetBestSpotChoice

func GetBestSpotChoice(r BestSpotChoiceRequest) (*BestSpotChoiceResponse, error)

This function will return the best spot option

type EvictionRate added in v0.6.5

type EvictionRate int
const (
	Lowest EvictionRate = iota
	Low
	Medium
	High
	Highest

	DefaultEvictionRate = Lowest
)

func ParseEvictionRate added in v0.6.5

func ParseEvictionRate(str string) (EvictionRate, bool)

Get eviction rate parsing its name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL