instance

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// MaxInstanceTypes defines the number of instance type options to pass to CreateFleet
	MaxInstanceTypes = 60
)

Functions

This section is empty.

Types

type Instance added in v0.28.0

type Instance struct {
	LaunchTime       time.Time
	State            string
	ID               string
	ImageID          string
	Type             string
	Zone             string
	CapacityType     string
	SecurityGroupIDs []string
	SubnetID         string
	Tags             map[string]string
}

Instance is an internal data representation of either an ec2.Instance or an ec2.FleetInstance It contains all the common data that is needed to inject into the Machine from either of these responses

func NewInstance added in v0.28.0

func NewInstance(out *ec2.Instance) *Instance

func NewInstanceFromFleet added in v0.28.0

func NewInstanceFromFleet(out *ec2.CreateFleetInstance, tags map[string]string) *Instance

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

func NewProvider

func NewProvider(ctx context.Context, region string, ec2api ec2iface.EC2API, unavailableOfferings *cache.UnavailableOfferings,
	instanceTypeProvider *instancetype.Provider, subnetProvider *subnet.Provider, launchTemplateProvider *launchtemplate.Provider) *Provider

func (*Provider) Create

func (p *Provider) Create(ctx context.Context, nodeTemplate *v1alpha1.AWSNodeTemplate, machine *v1alpha5.Machine, instanceTypes []*cloudprovider.InstanceType) (*Instance, error)

func (*Provider) Delete

func (p *Provider) Delete(ctx context.Context, id string) error

func (*Provider) Get

func (p *Provider) Get(ctx context.Context, id string) (*Instance, error)
func (p *Provider) Link(ctx context.Context, id, provisionerName string) error

func (*Provider) List

func (p *Provider) List(ctx context.Context) ([]*Instance, error)

Jump to

Keyboard shortcuts

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