instance

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 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 SkipCache = func(opts *options) {
	opts.SkipCache = true
}

Functions

This section is empty.

Types

type DefaultProvider

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

func NewDefaultProvider

func NewDefaultProvider(
	region string,
	recorder events.Recorder,
	client sdk.LinodeAPI,
	unavailableOfferings *linodecache.UnavailableOfferings,
	instanceCache *cache.Cache,
) *DefaultProvider

func (*DefaultProvider) Create

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

func (*DefaultProvider) CreateTags

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

NOTE: Linode's API only supports creating tags one at a time. This might be a problem if we want to add multiple tags at once.

func (*DefaultProvider) Delete

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

func (*DefaultProvider) Get

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

func (*DefaultProvider) List

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

func (*DefaultProvider) UpdateTags added in v0.1.5

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

type Instance

type Instance struct {
	ID                  int
	Created             *time.Time
	Region              string
	Image               string
	Group               string
	Label               string
	Type                string
	Status              linodego.InstanceStatus
	WatchdogEnabled     bool
	Tags                []string
	PlacementGroup      *linodego.InstancePlacementGroup
	DiskEncryption      linodego.InstanceDiskEncryption
	InterfaceGeneration linodego.InterfaceGeneration
}

Instance is an internal data representation of a linode.Instance It contains all the common data that is needed to inject into the Machine from this responses

func NewInstance

func NewInstance(_ context.Context, instance *linodego.Instance) *Instance

func NewLKEInstance

func NewLKEInstance(instanceID int, instanceType string, tags []string, region string, created *time.Time) *Instance

type Options

type Options = option.Function[options]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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