elbv2

package
v0.0.0-...-0420b53 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewELBV2

func NewELBV2(awsSession *session.Session)

NewELBV2 returns an ELBV2 based off of the provided AWS session

Types

type Attributes

type Attributes struct {
	AttributesAPI
	Items []*elbv2.LoadBalancerAttribute
}

func (Attributes) Len

func (a Attributes) Len() int

func (Attributes) Less

func (a Attributes) Less(i, j int) bool

func (Attributes) Swap

func (a Attributes) Swap(i, j int)

type AttributesAPI

type AttributesAPI interface {
	Len() int
	Less(i, j int) bool
	Swap(i, j int)
}

type ELBV2

type ELBV2 struct {
	elbv2iface.ELBV2API
}

ELBV2 is our extension to AWS's elbv2.ELBV2

func (*ELBV2) ClusterLoadBalancers

func (e *ELBV2) ClusterLoadBalancers(clusterName *string) ([]*elbv2.LoadBalancer, error)

ClusterLoadBalancers looks up all ELBV2 (ALB) instances in AWS that are part of the cluster.

func (*ELBV2) DescribeListenersForLoadBalancer

func (e *ELBV2) DescribeListenersForLoadBalancer(loadBalancerArn *string) ([]*elbv2.Listener, error)

DescribeListenersForLoadBalancer looks up all ELBV2 (ALB) listeners in AWS that are part of the cluster.

func (*ELBV2) DescribeTagsForArn

func (e *ELBV2) DescribeTagsForArn(arn *string) (util.Tags, error)

DescribeTagsForArn looks up all tags for a given ARN.

func (*ELBV2) DescribeTargetGroupTargetsForArn

func (e *ELBV2) DescribeTargetGroupTargetsForArn(arn *string, targets []*elbv2.TargetDescription) (result util.AWSStringSlice, err error)

DescribeTargetGroupTargetsForArn looks up target group targets by an ARN.

func (*ELBV2) DescribeTargetGroupsForLoadBalancer

func (e *ELBV2) DescribeTargetGroupsForLoadBalancer(loadBalancerArn *string) ([]*elbv2.TargetGroup, error)

DescribeTargetGroupsForLoadBalancer looks up all ELBV2 (ALB) target groups in AWS that are part of the cluster.

func (*ELBV2) RemoveListener

func (e *ELBV2) RemoveListener(in elbv2.DeleteListenerInput) error

RemoveListener removes a Listener from an ELBV2 (ALB) by deleting it in AWS. If the deletion attempt returns a elbv2.ErrCodeListenerNotFoundException, it's considered a success as the listener has already been removed. If removal fails for another reason, an error is returned.

func (*ELBV2) RemoveTargetGroup

func (e *ELBV2) RemoveTargetGroup(in elbv2.DeleteTargetGroupInput) error

RemoveTargetGroup removes a Target Group from AWS by deleting it. If the deletion fails, an error is returned. Often, a Listener that references the Target Group is still being deleted when this method is accessed. Thus, this method makes multiple attempts to delete the Target Group when it receives an elbv2.ErrCodeResourceInUseException.

func (*ELBV2) SetIdleTimeout

func (e *ELBV2) SetIdleTimeout(arn *string, timeout int64) error

SetIdleTimeout attempts to update an ELBV2's connection idle timeout setting. It must be passed a timeout in the range of 1-3600. If it fails to update, // an error will be returned.

func (*ELBV2) Status

func (e *ELBV2) Status() func() error

Status validates ELBV2 connectivity

func (*ELBV2) UpdateAttributes

func (e *ELBV2) UpdateAttributes(arn *string, attributes []*elbv2.LoadBalancerAttribute) error

Update Attributes adds attributes to the loadbalancer.

func (*ELBV2) UpdateTags

func (e *ELBV2) UpdateTags(arn *string, old util.Tags, new util.Tags) error

UpdateTags compares the new (desired) tags against the old (current) tags. It then adds and removes tags as needed.

type ELBV2API

type ELBV2API interface {
	elbv2iface.ELBV2API
	ClusterLoadBalancers(clusterName *string) ([]*elbv2.LoadBalancer, error)
	SetIdleTimeout(arn *string, timeout int64) error
	UpdateTags(arn *string, old util.Tags, new util.Tags) error
	UpdateAttributes(arn *string, new []*elbv2.LoadBalancerAttribute) error
	RemoveTargetGroup(in elbv2.DeleteTargetGroupInput) error
	DescribeTagsForArn(arn *string) (util.Tags, error)
	DescribeTargetGroupTargetsForArn(arn *string, targets []*elbv2.TargetDescription) (util.AWSStringSlice, error)
	RemoveListener(in elbv2.DeleteListenerInput) error
	DescribeTargetGroupsForLoadBalancer(loadBalancerArn *string) ([]*elbv2.TargetGroup, error)
	DescribeListenersForLoadBalancer(loadBalancerArn *string) ([]*elbv2.Listener, error)
	Status() func() error
}
var ELBV2svc ELBV2API

ELBV2svc is a pointer to the awsutil ELBV2 service

Jump to

Keyboard shortcuts

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