instance

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultProvider added in v0.36.0

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

func NewDefaultProvider added in v0.36.0

func NewDefaultProvider(ctx context.Context, region string, ec2api sdk.EC2API, unavailableOfferings *cache.UnavailableOfferings,
	subnetProvider subnet.Provider, launchTemplateProvider launchtemplate.Provider) *DefaultProvider

func (*DefaultProvider) Create added in v0.36.0

func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1.EC2NodeClass, nodeClaim *karpv1.NodeClaim, tags map[string]string, instanceTypes []*cloudprovider.InstanceType) (*Instance, error)

func (*DefaultProvider) CreateTags added in v0.36.0

func (p *DefaultProvider) CreateTags(ctx context.Context, id string, tags map[string]string) error

func (*DefaultProvider) Delete added in v0.36.0

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

func (*DefaultProvider) Get added in v0.36.0

func (p *DefaultProvider) Get(ctx context.Context, id string) (*Instance, error)

func (*DefaultProvider) List added in v0.36.0

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

type Instance

type Instance struct {
	LaunchTime       time.Time
	State            ec2types.InstanceStateName
	ID               string
	ImageID          string
	Type             ec2types.InstanceType
	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 ec2types.Instance) *Instance

func NewInstanceFromFleet

func NewInstanceFromFleet(out ec2types.CreateFleetInstance, tags map[string]string, efaEnabled bool) *Instance

Jump to

Keyboard shortcuts

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