Documentation
¶
Index ¶
- Constants
- Variables
- func AssociateRouteTable(ec2Client *ec2.Client, subnetID string, routeTableID string) error
- func AttachInternetGatewayToVPC(ec2Client *ec2.Client, internetGatewayId string, VPCID string) error
- func CreateDynamoDBTableForRecodeConfig(dynamoDBClient *dynamodb.Client) error
- func DetachInternetGatewayFromVPC(ec2Client *ec2.Client, internetGatewayId string, VPCID string) error
- func LookupRecodeConfigInDynamoDBTable(dynamoDBClient *dynamodb.Client) (returnedConfigJSON string, returnedError error)
- func RemoveDynamoDBTableForRecodeConfig(dynamoDBClient *dynamodb.Client) error
- func RemoveInternetGateway(ec2Client *ec2.Client, internetGatewayId string) error
- func RemoveKeyPair(ec2Client *ec2.Client, keyPairID string) error
- func RemoveNetworkInterface(ec2Client *ec2.Client, networkInterfaceID string) error
- func RemoveRouteTable(ec2Client *ec2.Client, routeTableID string) error
- func RemoveSecurityGroup(ec2Client *ec2.Client, securityGroupID string) error
- func RemoveSubnet(ec2Client *ec2.Client, subnetID string) error
- func RemoveVPC(ec2Client *ec2.Client, VPCID string) error
- func StartInstance(ec2Client *ec2.Client, instance *Instance) error
- func StopInstance(ec2Client *ec2.Client, instance *Instance) error
- func TerminateInstance(ec2Client *ec2.Client, instanceID string) error
- func UpdateRecodeConfigInDynamoDBTable(dynamoDBClient *dynamodb.Client, configID string, configJSON string) error
- func WaitForSSHAvailableInInstance(ec2Client *ec2.Client, instancePublicIPAddress string, instanceSSHPort string) (returnedError error)
- type AMI
- type AttachVolumeResp
- type CreateSnapshotForVolumeResp
- type CreateVolumeFromSnapshotResp
- type DetachVolumeResp
- type DynamoDBRecodeConfigTableRecord
- type InitInstanceScriptResults
- type Instance
- type InstanceTypeArch
- type InstanceTypeInfos
- type InstanceVolume
- type InternetGateway
- type KeyPair
- type NetworkInterface
- type RawInitInstanceScriptResults
- type RemoveVolumeResp
- type RemoveVolumeSnapshotResp
- type Route
- type RouteTable
- type SecurityGroup
- type StartInstanceResp
- type Subnet
- type VPC
Constants ¶
View Source
const ( InstanceTypeArchArm64 = "arm64" InstanceTypeArchX8664 = "x86_64" )
View Source
const ( UbuntuAMIRootUser = "ubuntu" UbuntuAMINamePatternAmd64 = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*" UbuntuAMINamePatternArm64 = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-arm64-server-*" )
View Source
const DynamoDBRecodeConfigTableName = "recode-configuration-dynamodb-table"
View Source
const (
InstanceRootDeviceSizeGb = 16
)
Variables ¶
View Source
var ( ErrNoRecodeConfigFound = errors.New("ErrNoRecodeConfigFound") ErrMultipleRecodeConfigFound = errors.New("ErrMultipleRecodeConfigFound") )
View Source
var ( ErrInvalidInstanceType = errors.New("ErrInvalidInstanceType") ErrInvalidInstanceTypeArch = errors.New("ErrInvalidInstanceTypeArch") SupportedInstanceTypeArchs = []string{ string(InstanceTypeArchArm64), string(InstanceTypeArchX8664), } )
View Source
var (
ErrInstanceNotFound = errors.New("ErrInstanceNotFound")
)
View Source
var (
ErrRecodeConfigTableAlreadyExists = errors.New("ErrRecodeConfigTableAlreadyExists")
)
Functions ¶
func AssociateRouteTable ¶
func RemoveInternetGateway ¶
func RemoveNetworkInterface ¶
func RemoveSecurityGroup ¶
Types ¶
type AMI ¶
type AMI struct {
ID string `json:"id"`
RootUser string `json:"root_user"`
RootDeviceName string `json:"root_device_name"`
}
func LookupUbuntuAMIForArch ¶
func LookupUbuntuAMIForArch( ec2Client *ec2.Client, arch InstanceTypeArch, ) (returnedAMI *AMI, returnedError error)
type CreateSnapshotForVolumeResp ¶
func CreateSnapshotForVolume ¶
func CreateSnapshotForVolume( ec2Client *ec2.Client, name string, volumeID string, ) (resp CreateSnapshotForVolumeResp)
type InitInstanceScriptResults ¶
type InitInstanceScriptResults struct {
ExitCode string `json:"exit_code"`
SSHHostKeys []entities.DevEnvSSHHostKey `json:"ssh_host_keys"`
}
type Instance ¶
type Instance struct {
ID string `json:"id"`
Type string `json:"type"`
PublicIPAddress string `json:"public_ip_address"`
PublicHostname string `json:"public_hostname"`
Volumes []InstanceVolume `json:"volumes"`
InitScriptResults *InitInstanceScriptResults `json:"init_script_results"`
}
type InstanceTypeArch ¶
type InstanceTypeArch string
type InstanceTypeInfos ¶
type InstanceTypeInfos struct {
Type string `json:"type"`
Arch InstanceTypeArch `json:"arch"`
}
func LookupInstanceTypeInfos ¶
func LookupInstanceTypeInfos( ec2Client *ec2.Client, instanceType string, ) (returnedInstanceTypeInfos *InstanceTypeInfos, returnedError error)
type InstanceVolume ¶
type InternetGateway ¶
type InternetGateway struct {
ID string `json:"id"`
IsAttachedToVPC bool `json:"is_attached_to_vpc"`
}
func CreateInternetGateway ¶
func CreateInternetGateway( ec2Client *ec2.Client, name string, ) (returnedIG *InternetGateway, returnedError error)
type KeyPair ¶
type NetworkInterface ¶
type NetworkInterface struct {
ID string `json:"id"`
}
func CreateNetworkInterface ¶
type RemoveVolumeResp ¶
type RemoveVolumeResp struct {
Err error
}
func RemoveVolume ¶
func RemoveVolume( ec2Client *ec2.Client, volumeID string, ) (resp RemoveVolumeResp)
type RemoveVolumeSnapshotResp ¶
type RemoveVolumeSnapshotResp struct {
Err error
}
func RemoveVolumeSnapshot ¶
func RemoveVolumeSnapshot( ec2Client *ec2.Client, snapshotID string, ) (resp RemoveVolumeSnapshotResp)
type RouteTable ¶
type RouteTable struct {
ID string `json:"id"`
IsAssociatedToSubnet bool `json:"is_associated_to_subnet"`
}
func CreateRouteTable ¶
type SecurityGroup ¶
type SecurityGroup struct {
ID string `json:"id"`
}
func CreateSecurityGroup ¶
func CreateSecurityGroup( ec2Client *ec2.Client, name string, description string, VPCID string, ingressPorts []types.IpPermission, ) (returnedSecurityGroup *SecurityGroup, returnedError error)
type StartInstanceResp ¶
Source Files
¶
- associate_route_table.go
- attach_internet_gateway.go
- create_dynamodb_table.go
- create_instance.go
- create_internet_gateway.go
- create_key_pair.go
- create_network_interface.go
- create_route.go
- create_route_table.go
- create_security_group.go
- create_subnet.go
- create_vpc.go
- detach_internet_gateway.go
- get_most_recent_ami.go
- instance_ssh.go
- lookup_dynamodb_table_records.go
- lookup_instance.go
- lookup_instance_type_infos.go
- lookup_ubuntu_ami.go
- remove_dynamodb_table.go
- remove_instance.go
- remove_internet_gateway.go
- remove_key_pair.go
- remove_network_interface.go
- remove_route_table.go
- remove_security_group.go
- remove_subnet.go
- remove_vpc.go
- start_instance.go
- stop_instance.go
- update_dynamodb_table_records.go
- volume.go
Click to show internal directories.
Click to hide internal directories.