Documentation ¶
Index ¶
- Constants
- type SpotAdvisor
- func (sad *SpotAdvisor) GetCheckSum(data interface{}) string
- func (sad *SpotAdvisor) GetCoresFor(iType string) int
- func (sad *SpotAdvisor) GetData() (interface{}, error)
- func (sad *SpotAdvisor) GetLastChanges() time.Time
- func (sad *SpotAdvisor) GetProbabilityFor(region string, osType string, iType string) int
- func (sad *SpotAdvisor) GetRamGbFor(iType string) int
- func (sad *SpotAdvisor) GetSavingFor(region string, osType string, iType string) int
- func (sad *SpotAdvisor) ProcessData(data interface{}) error
Constants ¶
View Source
const DEFAULT_SPOT_ADVISOR_URL string = "https://spot-bid-advisor.s3.amazonaws.com/spot-advisor-data.json"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SpotAdvisor ¶
type SpotAdvisor struct { *fetcher.DataManager Data map[string]map[string]map[string]instanceTypeData `json:"spot_advisor"` InstanceTypes map[string]struct { Cores uint `json:"cores"` Ram_gb float64 `json:"ram_gb"` Emr bool `json:"emr"` } `json:"instance_types"` Ranges []struct { Index int `json:"index"` Dots int `json:"dots"` Max int `json:"max"` Label string `json:"label"` } `json:"ranges"` GlobalRate string `json:"global_rate"` // contains filtered or unexported fields }
func NewSpotAdvisor ¶
func NewSpotAdvisor(refreshInterval time.Duration) (*SpotAdvisor, error)
func NewSpotAdvisorWithURL ¶
func NewSpotAdvisorWithURL(sadurl string, interval time.Duration) (*SpotAdvisor, error)
func (*SpotAdvisor) GetCheckSum ¶
func (sad *SpotAdvisor) GetCheckSum(data interface{}) string
func (*SpotAdvisor) GetCoresFor ¶
func (sad *SpotAdvisor) GetCoresFor(iType string) int
func (*SpotAdvisor) GetData ¶
func (sad *SpotAdvisor) GetData() (interface{}, error)
func (*SpotAdvisor) GetLastChanges ¶
func (sad *SpotAdvisor) GetLastChanges() time.Time
func (*SpotAdvisor) GetProbabilityFor ¶
func (sad *SpotAdvisor) GetProbabilityFor(region string, osType string, iType string) int
func (*SpotAdvisor) GetRamGbFor ¶
func (sad *SpotAdvisor) GetRamGbFor(iType string) int
func (*SpotAdvisor) GetSavingFor ¶
func (sad *SpotAdvisor) GetSavingFor(region string, osType string, iType string) int
func (*SpotAdvisor) ProcessData ¶
func (sad *SpotAdvisor) ProcessData(data interface{}) error
Click to show internal directories.
Click to hide internal directories.