instance

package
v0.34.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 29 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

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
	EFAEnabled       bool
}

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

func NewInstance(out *ec2.Instance) *Instance

func NewInstanceFromFleet

func NewInstanceFromFleet(out *ec2.CreateFleetInstance, tags map[string]string, efaEnabled bool) *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, nodeClass *v1beta1.EC2NodeClass, nodeClaim *corev1beta1.NodeClaim, instanceTypes []*cloudprovider.InstanceType) (*Instance, error)

func (*Provider) CreateTags

func (p *Provider) CreateTags(ctx context.Context, id string, tags map[string]string) 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 (*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