Documentation ¶
Index ¶
- Constants
- func IsInstanceStateOperationNotSupportedError(err error) bool
- type DefaultProvider
- func (p *DefaultProvider) Create(ctx context.Context, nodeClass *v1alpha1.ECSNodeClass, ...) (*Instance, error)
- func (p *DefaultProvider) CreateTags(ctx context.Context, id string, tags map[string]string) error
- func (p *DefaultProvider) Delete(ctx context.Context, id string) error
- func (p *DefaultProvider) Get(ctx context.Context, id string) (*Instance, error)
- func (p *DefaultProvider) List(ctx context.Context) ([]*Instance, error)
- type Instance
- type InstanceStateOperationNotSupportedError
- type Provider
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 ¶
Types ¶
type DefaultProvider ¶
type DefaultProvider struct {
// contains filtered or unexported fields
}
func NewDefaultProvider ¶
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 (*DefaultProvider) Delete ¶
func (p *DefaultProvider) Delete(ctx context.Context, id string) 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
func NewInstance ¶
func NewInstance(out *ecsclient.DescribeInstancesResponseBodyInstancesInstance) *Instance
func NewInstanceFromProvisioningGroup ¶
func NewInstanceFromProvisioningGroup(out *ecsclient.CreateAutoProvisioningGroupResponseBodyLaunchResultsLaunchResult, req *ecsclient.CreateAutoProvisioningGroupRequest, region string) *Instance
type InstanceStateOperationNotSupportedError ¶
type InstanceStateOperationNotSupportedError struct {
// contains filtered or unexported fields
}
func NewInstanceStateOperationNotSupportedError ¶
func NewInstanceStateOperationNotSupportedError(instanceID string) *InstanceStateOperationNotSupportedError
type Provider ¶
type Provider interface { Create(context.Context, *v1alpha1.ECSNodeClass, *karpv1.NodeClaim, []*cloudprovider.InstanceType) (*Instance, error) Get(context.Context, string) (*Instance, error) List(context.Context) ([]*Instance, error) Delete(context.Context, string) error CreateTags(context.Context, string, map[string]string) error }
Click to show internal directories.
Click to hide internal directories.