Documentation ¶
Index ¶
- Variables
- func GetLiveFileConfig(ctx context.Context) (aws.Config, error)
- func Int32GiBToUnit(i int32) units.Base2Bytes
- func NewCmdOptimize(t *terminal.Terminal, store optimizeInstancesStore) *cobra.Command
- func NewCmdOptimizeInstances(t *terminal.Terminal, store optimizeInstancesStore) *cobra.Command
- func OptimizeInstances(t *terminal.Terminal, args []string, _ optimizeInstancesStore) error
- type AWSClient
- func (a AWSClient) GetInstance(ctx context.Context, instanceID ids.CloudProviderInstanceID) (*Instance, error)
- func (a AWSClient) GetInstanceUserData(ctx context.Context, instanceID ids.CloudProviderInstanceID) (string, error)
- func (a AWSClient) GetInstanceVolumes(ctx context.Context, instanceID ids.CloudProviderInstanceID) ([]ec2types.Volume, error)
- func (a AWSClient) GetKeyPairByName(ctx context.Context, name string) (*KeyPair, error)
- func (a AWSClient) StartInstance(ctx context.Context, instanceID ids.CloudProviderInstanceID) error
- func (a AWSClient) StopInstance(ctx context.Context, instanceID ids.CloudProviderInstanceID) error
- func (a AWSClient) UpdateInstanceUserData(ctx context.Context, instanceID ids.CloudProviderInstanceID, userData string) error
- type Instance
- type KeyPair
- type LifecycleStatus
- type Status
- type UserDataArgs
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInstanceNotFound = fmt.Errorf("instance not found")
Functions ¶
func Int32GiBToUnit ¶
func Int32GiBToUnit(i int32) units.Base2Bytes
func NewCmdOptimize ¶ added in v0.6.128
func NewCmdOptimizeInstances ¶
Types ¶
type AWSClient ¶
type AWSClient struct {
// contains filtered or unexported fields
}
func GetAWSClient ¶
func NewAWSClient ¶
func (AWSClient) GetInstance ¶
func (AWSClient) GetInstanceUserData ¶
func (AWSClient) GetInstanceVolumes ¶
func (AWSClient) GetKeyPairByName ¶
func (AWSClient) StartInstance ¶
func (AWSClient) StopInstance ¶
func (AWSClient) UpdateInstanceUserData ¶
type Instance ¶
type Instance struct { ID ids.CloudProviderInstanceID Hostname string ImageID string InstanceType string DiskSize units.Base2Bytes PubKeyFingerprint string Status Status MetaEndpointEnabled bool MetaTagsEnabled bool VPCID string SubnetID string Spot bool Name string }
func AWSInstanceToInstanceAttrs ¶
func AWSInstanceToInstanceAttrs(instance ec2types.Instance, status LifecycleStatus, diskSize units.Base2Bytes, publicKeyFingerprint string) Instance
type LifecycleStatus ¶
type LifecycleStatus string
const ( LifecycleStatePending LifecycleStatus = "pending" LifecycleStateRunning LifecycleStatus = "running" LifecycleStateStopping LifecycleStatus = "stopping" LifecycleStateStopped LifecycleStatus = "stopped" LifecycleStateSuspending LifecycleStatus = "suspending" LifecycleStateSuspended LifecycleStatus = "suspended" LifecycleStateTerminating LifecycleStatus = "terminating" LifecycleStateTerminated LifecycleStatus = "terminated" )
func AWSInstanceStateToLifecyclState ¶
func AWSInstanceStateToLifecyclState(status ec2types.InstanceState) (LifecycleStatus, error)
type Status ¶
type Status struct {
LifecycleStatus LifecycleStatus
}
type UserDataArgs ¶
Click to show internal directories.
Click to hide internal directories.