spotadvisor

package
v0.0.0-...-e0af2a1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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