package elb

import "github.com/AdRoll/goamz/elb"

This package provides types and functions to interact Elastic Load Balancing service

Index

Types

type AppCookieStickinessPolicies

type AppCookieStickinessPolicies struct {
	CookieName string `xml:"CookieName"`
	PolicyName string `xml:"PolicyName"`
}

see http://goo.gl/clXGV for more information.

type BackendServerDescriptions

type BackendServerDescriptions struct {
	InstancePort int      `xml:"InstancePort"`
	PolicyNames  []string `xml:"PolicyNames>member"`
}

type CreateLoadBalancer

type CreateLoadBalancer struct {
	Name              string
	AvailabilityZones []string
	Listeners         []Listener
	Scheme            string
	SecurityGroups    []string
	Subnets           []string
}

The CreateLoadBalancer type encapsulates options for the respective request in AWS. The creation of a Load Balancer may differ inside EC2 and VPC.

See http://goo.gl/4QFKi for more details.

type CreateLoadBalancerResp

type CreateLoadBalancerResp struct {
	DNSName string `xml:"CreateLoadBalancerResult>DNSName"`
}

Response to a CreateLoadBalance request.

See http://goo.gl/4QFKi for more details.

type DescribeInstanceHealthResp

type DescribeInstanceHealthResp struct {
	InstanceStates []InstanceState `xml:"DescribeInstanceHealthResult>InstanceStates>member"`
}

Represents a XML response for DescribeInstanceHealth action

See http://goo.gl/ovIB1 for more information.

type DescribeLoadBalancerAttributesResp

type DescribeLoadBalancerAttributesResp struct {
	AccessLogEnabled          bool   `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>AccessLog>Enabled"`
	AccessLogS3Bucket         string `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>AccessLog>S3BucketName"`
	AccessLogS3Prefix         string `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>AccessLog>S3BucketPrefix"`
	AccessLogEmitInterval     int    `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>AccessLog>EmitInterval"`
	IdleTimeout               int    `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>ConnectionSettings>IdleTimeout"`
	CrossZoneLoadbalancing    bool   `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>CrossZoneLoadBalancing>Enabled"`
	ConnectionDrainingTimeout int    `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>ConnectionDraining>Timeout"`
	ConnectionDrainingEnabled bool   `xml:"DescribeLoadBalancerAttributesResult>LoadBalancerAttributes>ConnectionDraining>Enabled"`
}

type DescribeLoadBalancerResp

type DescribeLoadBalancerResp struct {
	LoadBalancerDescriptions []LoadBalancerDescription `xml:"DescribeLoadBalancersResult>LoadBalancerDescriptions>member"`
}

type ELB

type ELB struct {
	aws.Auth
	aws.Region
}

func New

func New(auth aws.Auth, region aws.Region) *ELB

func (*ELB) ConfigureHealthCheck

func (elb *ELB) ConfigureHealthCheck(lbName string, healthCheck *HealthCheck) (*HealthCheckResp, error)

Configure health check for a LB

See http://goo.gl/2HE6a for more information

func (*ELB) CreateLoadBalancer

func (elb *ELB) CreateLoadBalancer(options *CreateLoadBalancer) (resp *CreateLoadBalancerResp, err error)

Creates a Load Balancer in Amazon.

See http://goo.gl/4QFKi for more details.

func (*ELB) DeleteLoadBalancer

func (elb *ELB) DeleteLoadBalancer(name string) (resp *SimpleResp, err error)

Deletes a Load Balancer.

See http://goo.gl/sDmPp for more details.

func (*ELB) DeregisterInstancesFromLoadBalancer

func (elb *ELB) DeregisterInstancesFromLoadBalancer(instanceIds []string, lbName string) (resp *SimpleResp, err error)

Deregister N instances from a given Load Balancer.

See http://goo.gl/Hgo4U for more details.

func (*ELB) DescribeInstanceHealth

func (elb *ELB) DescribeInstanceHealth(lbName string, instanceIds ...string) (*DescribeInstanceHealthResp, error)

Describe instance health.

See http://goo.gl/ovIB1 for more information.

func (*ELB) DescribeLoadBalancerAttributes

func (elb *ELB) DescribeLoadBalancerAttributes(lbName string) (*DescribeLoadBalancerAttributesResp, error)

func (*ELB) DescribeLoadBalancers

func (elb *ELB) DescribeLoadBalancers(names ...string) (*DescribeLoadBalancerResp, error)

Describe Load Balancers. It can be used to describe all Load Balancers or specific ones.

See http://goo.gl/wofJA for more details.

func (*ELB) RegisterInstancesWithLoadBalancer

func (elb *ELB) RegisterInstancesWithLoadBalancer(instanceIds []string, lbName string) (resp *RegisterInstancesResp, err error)

Register N instances with a given Load Balancer.

See http://goo.gl/x9hru for more details.

type Error

type Error struct {
	// HTTP status code
	StatusCode int
	// AWS error code
	Code string
	// The human-oriented error message
	Message string
}

Error encapsulates an error returned by ELB.

func (*Error) Error

func (err *Error) Error() string

type HealthCheck

type HealthCheck struct {
	HealthyThreshold   int    `xml:"HealthyThreshold"`
	Interval           int    `xml:"Interval"`
	Target             string `xml:"Target"`
	Timeout            int    `xml:"Timeout"`
	UnhealthyThreshold int    `xml:"UnhealthyThreshold"`
}

type HealthCheckResp

type HealthCheckResp struct {
	HealthCheck *HealthCheck `xml:"ConfigureHealthCheckResult>HealthCheck"`
}

type Instance

type Instance struct {
	InstanceId string `xml:"InstanceId"`
}

type InstanceState

type InstanceState struct {
	Description string `xml:"Description"`
	InstanceId  string `xml:"InstanceId"`
	ReasonCode  string `xml:"ReasonCode"`
	State       string `xml:"State"`
}

See http://goo.gl/dzWfP for more information.

type LBCookieStickinessPolicies

type LBCookieStickinessPolicies struct {
	CookieExpirationPeriod int    `xml:"CookieExpirationPeriod"`
	PolicyName             string `xml:"PolicyName"`
}

type Listener

type Listener struct {
	InstancePort     int
	InstanceProtocol string
	LoadBalancerPort int
	Protocol         string
	SSLCertificateId string
}

Listener to configure in Load Balancer.

See http://goo.gl/NJQCj for more details.

type ListenerDescription

type ListenerDescription struct {
	Listener    Listener `xml:"Listener"`
	PolicyNames []string `xml:"PolicyNames>member"`
}

type LoadBalancerDescription

type LoadBalancerDescription struct {
	AvailabilityZones         []string                    `xml:"AvailabilityZones>member"`
	BackendServerDescriptions []BackendServerDescriptions `xml:"BackendServerDescriptions>member"`
	CanonicalHostedZoneName   string                      `xml:"CanonicalHostedZoneName"`
	CanonicalHostedZoneNameId string                      `xml:"CanonicalHostedZoneNameID"`
	CreatedTime               time.Time                   `xml:"CreatedTime"`
	DNSName                   string                      `xml:"DNSName"`
	HealthCheck               HealthCheck                 `xml:"HealthCheck"`
	Instances                 []Instance                  `xml:"Instances>member"`
	ListenerDescriptions      []ListenerDescription       `xml:"ListenerDescriptions>member"`
	LoadBalancerName          string                      `xml:"LoadBalancerName"`
	Policies                  Policies                    `xml:"Policies"`
	Scheme                    string                      `xml:"Scheme"`
	SecurityGroups            []string                    `xml:"SecurityGroups>member"` //vpc only
	SourceSecurityGroup       SourceSecurityGroup         `xml:"SourceSecurityGroup"`
	Subnets                   []string                    `xml:"Subnets>member"`
	VPCId                     string                      `xml:"VPCId"`
}

type Policies

type Policies struct {
	AppCookieStickinessPolicies []AppCookieStickinessPolicies `xml:"AppCookieStickinessPolicies>member"`
	LBCookieStickinessPolicies  []LBCookieStickinessPolicies  `xml:"LBCookieStickinessPolicies>member"`
	OtherPolicies               []string                      `xml:"OtherPolicies>member"`
}

type RegisterInstancesResp

type RegisterInstancesResp struct {
	InstanceIds []string `xml:"RegisterInstancesWithLoadBalancerResult>Instances>member>InstanceId"`
}

type SimpleResp

type SimpleResp struct {
	RequestId string `xml:"ResponseMetadata>RequestId"`
}

type SourceSecurityGroup

type SourceSecurityGroup struct {
	GroupName  string `xml:"GroupName"`
	OwnerAlias string `xml:"OwnerAlias"`
}

Source Files

elb.go

Directories

PathSynopsis
elb/elbtestPackage elbtest implements a fake ELB provider with the capability of inducing errors on any given operation, and retrospectively determining what operations have been carried out.
Version
v0.0.0-20170825154802-2731d20f46f4 (latest)
Published
Aug 25, 2017
Platform
linux/amd64
Imports
7 packages
Last checked
11 months ago

Tools for package owners.