Documentation
¶
Index ¶
- Variables
- func Setup(awsConfig aws.Config)
- type ACM
- type AwsumILBService
- type CreateInstanceTargetGroupOptions
- type EC2
- func (svc *EC2) Client() *ec2.Client
- func (svc *EC2) CreateEmptySecurityGroup(ctx context.Context, name string) (*ec2.CreateSecurityGroupOutput, error)
- func (svc *EC2) GetAllRunningInstances(ctx context.Context) ([]*Instance, error)
- func (svc *EC2) GetAllSecurityGroupRules(ctx context.Context) ([]types.SecurityGroupRule, error)
- func (svc *EC2) GetAllSubnets(ctx context.Context) ([]types.Subnet, error)
- func (svc *EC2) GetAllVPCs(ctx context.Context) ([]types.Vpc, error)
- func (svc *EC2) SearchForSecurityGroupByName(ctx context.Context, name string) (*types.SecurityGroup, error)
- type ELBv2
- func (svc *ELBv2) Client() *elbv2.Client
- func (svc *ELBv2) DeleteAllListenersInLoadBalancer(ctx context.Context, loadBalancerArn string) error
- func (svc *ELBv2) DeregisterAllTargetsInTargetGroup(ctx context.Context, targetGroupArn string) error
- func (svc *ELBv2) GenerateAwsumServiceName(serviceName string) string
- func (svc *ELBv2) GetAllListenersInLoadBalancer(ctx context.Context, loadBalancerArn string) ([]types.Listener, error)
- func (svc *ELBv2) SearchForLoadBalancerByName(ctx context.Context, name string) (*types.LoadBalancer, error)
- func (svc *ELBv2) SearchForTargetGroupByName(ctx context.Context, name string) (*types.TargetGroup, error)
- type ILBServiceResources
- type Instance
- func (i *Instance) AttachShell(sshUser string) error
- func (i *Instance) DialSSH(user string) (*ssh.Client, error)
- func (i *Instance) GenerateSSHClientConfigFromAssumedUserKey(user string) (*ssh.ClientConfig, error)
- func (i *Instance) GetFormattedBestIpAddress() string
- func (i *Instance) GetFormattedType() string
- func (i *Instance) GetName() string
- func (i *Instance) RunInteractiveCommand(sshUser string, command string) error
- type InstanceFilters
- type SetupNewILBServiceOptions
Constants ¶
This section is empty.
Variables ¶
var ( ErrTargetGroupNotReturnedAfterCreation = errors.New("target group not returned after creation") ErrTargetInstancesMustAllBeInSameVPC = errors.New("target instances must all be in the same vpc") )
var ( DefaultEC2 *EC2 DefaultELBv2 *ELBv2 DefaultACM *ACM DefaultAwsumILB *AwsumILBService )
Functions ¶
Types ¶
type ACM ¶ added in v1.1.1
type ACM struct {
// contains filtered or unexported fields
}
func (*ACM) GenerateLoadBalanceCertificateListFromCertificateNames ¶ added in v1.1.1
type AwsumILBService ¶
AwsumILBService is a struct used to encompass all the logic of services on instances that are load balanced by resources created by awsum.
func NewAwsumILBService ¶
func NewAwsumILBService(awsConfig aws.Config) *AwsumILBService
func (*AwsumILBService) SetupNewILBService ¶
func (svc *AwsumILBService) SetupNewILBService(opts SetupNewILBServiceOptions) (*ILBServiceResources, error)
type EC2 ¶
type EC2 struct {
// contains filtered or unexported fields
}
func (*EC2) CreateEmptySecurityGroup ¶
func (*EC2) GetAllRunningInstances ¶
func (*EC2) GetAllSecurityGroupRules ¶ added in v1.1.1
func (*EC2) GetAllSubnets ¶
func (*EC2) SearchForSecurityGroupByName ¶
func (svc *EC2) SearchForSecurityGroupByName(ctx context.Context, name string) (*types.SecurityGroup, error)
SearchForSecurityGroupByName will return a security group matching the name given, if there are no matches then it will return a nil pointer and a nil error.
type ELBv2 ¶
type ELBv2 struct {
// contains filtered or unexported fields
}
func (*ELBv2) DeleteAllListenersInLoadBalancer ¶
func (*ELBv2) DeregisterAllTargetsInTargetGroup ¶
func (*ELBv2) GenerateAwsumServiceName ¶
func (*ELBv2) GetAllListenersInLoadBalancer ¶
func (*ELBv2) SearchForLoadBalancerByName ¶ added in v1.1.1
func (*ELBv2) SearchForTargetGroupByName ¶ added in v1.1.1
type ILBServiceResources ¶ added in v1.1.1
type Instance ¶
func NewInstanceFromEC2 ¶
func (*Instance) AttachShell ¶
func (*Instance) GenerateSSHClientConfigFromAssumedUserKey ¶
func (i *Instance) GenerateSSHClientConfigFromAssumedUserKey(user string) (*ssh.ClientConfig, error)
GenerateSSHClientConfigFromAssumedUserKey generates an ssh client config with keys from the user's ssh directory. Assumed to be '~/.ssh'. The given user will be used in authentication.
func (*Instance) GetFormattedBestIpAddress ¶
GetFormattedBestIpAddress returns a string containing the 'best' ip address to display for the instance. By 'best', meaning return the EC2 instance's public ip address if it is available, if not, return the private ip address.
func (*Instance) GetFormattedType ¶
type InstanceFilters ¶
type InstanceFilters struct {
Name string
}
func (InstanceFilters) DoesMatch ¶
func (f InstanceFilters) DoesMatch(instance *Instance) bool
func (InstanceFilters) Matches ¶
func (f InstanceFilters) Matches(instances []*Instance) []*Instance
type SetupNewILBServiceOptions ¶
type SetupNewILBServiceOptions struct { Ctx context.Context ServiceName string TargetInstanceFilters InstanceFilters LoadBalancerListenerProtocol types.ProtocolEnum LoadBalancerIpProtocol string LoadBalancerPort int32 TrafficPort int32 TrafficProtocol types.ProtocolEnum CertificateNames []string }
func (SetupNewILBServiceOptions) AwsumResourceName ¶
func (opts SetupNewILBServiceOptions) AwsumResourceName() string