instance

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Ref: https://api.aliyun.com/api/Ecs/2014-05-26/DescribeInstances
	InstanceStatusPending  = "Pending"
	InstanceStatusRunning  = "Running"
	InstanceStatusStarting = "Starting"
	InstanceStatusStopping = "Stopping"
	InstanceStatusStopped  = "Stopped"
)

Variables

This section is empty.

Functions

func IsInstanceStateOperationNotSupportedError

func IsInstanceStateOperationNotSupportedError(err error) bool

Types

type DefaultProvider

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

func NewDefaultProvider

func NewDefaultProvider(ctx context.Context, region string, ecsClient *ecsclient.Client,
	imageFamilyResolver imagefamily.Resolver, vSwitchProvider vswitch.Provider,
	ackProvider ack.Provider) *DefaultProvider

func (*DefaultProvider) Create

func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1alpha1.ECSNodeClass, nodeClaim *karpv1.NodeClaim,
	instanceTypes []*cloudprovider.InstanceType,
) (*Instance, error)

func (*DefaultProvider) CreateTags

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

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) (*Instance, error)

func (*DefaultProvider) List

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

type Instance

type Instance struct {
	CreationTime     time.Time         `json:"creationTime"`
	Status           string            `json:"status"`
	ID               string            `json:"id"`
	ImageID          string            `json:"imageId"`
	Type             string            `json:"type"`
	Region           string            `json:"region"`
	Zone             string            `json:"zone"`
	CapacityType     string            `json:"capacityType"`
	SecurityGroupIDs []string          `json:"securityGroupIds"`
	VSwitchID        string            `json:"vSwitchId"`
	Tags             map[string]string `json:"tags"`
}

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

type InstanceStateOperationNotSupportedError

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

func NewInstanceStateOperationNotSupportedError

func NewInstanceStateOperationNotSupportedError(instanceID string) *InstanceStateOperationNotSupportedError

Jump to

Keyboard shortcuts

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