elb

package
v0.0.0-...-524d980 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2015 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 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) 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"`
}

Directories

Path Synopsis
Package 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.
Package 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.

Jump to

Keyboard shortcuts

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