instancetypes

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

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