instancetypes

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CacheFileName = "ec2-instance-types.json"
)

Functions

This section is empty.

Types

type Details

type Details struct {
	ec2.InstanceTypeInfo
	OndemandPricePerHour *float64
	SpotPrice            *float64
}

Details hold all the information on an ec2 instance type

type Provider added in v2.1.0

type Provider struct {
	Region         string
	DirectoryPath  string
	FullRefreshTTL time.Duration
	// contains filtered or unexported fields
}

func LoadFromOrNew added in v2.1.0

func LoadFromOrNew(directoryPath string, region string, ttl time.Duration, ec2Client ec2iface.EC2API) *Provider

func NewProvider added in v2.1.0

func NewProvider(directoryPath string, region string, ttl time.Duration, ec2Client ec2iface.EC2API) *Provider

func (*Provider) CacheCount added in v2.1.0

func (p *Provider) CacheCount() int

func (*Provider) Clear added in v2.1.0

func (p *Provider) Clear() error

func (*Provider) Get added in v2.1.0

func (p *Provider) Get(instanceTypes []string) ([]*Details, error)

func (*Provider) Save added in v2.1.0

func (p *Provider) Save() error

Jump to

Keyboard shortcuts

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