aws

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2020 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagNameCluster = "kubernetes.io/cluster"

	TagNameSubnetInternalELB = "kubernetes.io/role/internal-elb"
	TagNameSubnetPublicELB   = "kubernetes.io/role/elb"
)
View Source
const (
	ResourceTypeEnumELBLoadBalancer  = "elasticloadbalancing:loadbalancer"
	ResourceTypeEnumELBTargetGroup   = "elasticloadbalancing:targetgroup"
	ResourceTypeEnumEC2SecurityGroup = "ec2:security-group"
)

Variables

This section is empty.

Functions

func Bool

func Bool(v bool) *bool

Bool returns a pointer to the bool value passed in.

func BoolMap

func BoolMap(src map[string]bool) map[string]*bool

BoolMap converts a string map of bool values into a string map of bool pointers

func BoolSlice

func BoolSlice(src []bool) []*bool

BoolSlice converts a slice of bool values into a slice of bool pointers

func BoolValue

func BoolValue(v *bool) bool

BoolValue returns the value of the bool pointer passed in or false if the pointer is nil.

func BoolValueMap

func BoolValueMap(src map[string]*bool) map[string]bool

BoolValueMap converts a string map of bool pointers into a string map of bool values

func BoolValueSlice

func BoolValueSlice(src []*bool) []bool

BoolValueSlice converts a slice of bool pointers into a slice of bool values

func Float64

func Float64(v float64) *float64

Float64 returns a pointer to the float64 value passed in.

func Float64Map

func Float64Map(src map[string]float64) map[string]*float64

Float64Map converts a string map of float64 values into a string map of float64 pointers

func Float64Slice

func Float64Slice(src []float64) []*float64

Float64Slice converts a slice of float64 values into a slice of float64 pointers

func Float64Value

func Float64Value(v *float64) float64

Float64Value returns the value of the float64 pointer passed in or 0 if the pointer is nil.

func Float64ValueMap

func Float64ValueMap(src map[string]*float64) map[string]float64

Float64ValueMap converts a string map of float64 pointers into a string map of float64 values

func Float64ValueSlice

func Float64ValueSlice(src []*float64) []float64

Float64ValueSlice converts a slice of float64 pointers into a slice of float64 values

func GetVpcIDFromEC2Metadata

func GetVpcIDFromEC2Metadata(metadata *ec2metadata.EC2Metadata) (string, error)

func Int

func Int(v int) *int

Int returns a pointer to the int value passed in.

func Int64

func Int64(v int64) *int64

Int64 returns a pointer to the int64 value passed in.

func Int64Map

func Int64Map(src map[string]int64) map[string]*int64

Int64Map converts a string map of int64 values into a string map of int64 pointers

func Int64Slice

func Int64Slice(src []int64) []*int64

Int64Slice converts a slice of int64 values into a slice of int64 pointers

func Int64Value

func Int64Value(v *int64) int64

Int64Value returns the value of the int64 pointer passed in or 0 if the pointer is nil.

func Int64ValueMap

func Int64ValueMap(src map[string]*int64) map[string]int64

Int64ValueMap converts a string map of int64 pointers into a string map of int64 values

func Int64ValueSlice

func Int64ValueSlice(src []*int64) []int64

Int64ValueSlice converts a slice of int64 pointers into a slice of int64 values

func IntMap

func IntMap(src map[string]int) map[string]*int

IntMap converts a string map of int values into a string map of int pointers

func IntSlice

func IntSlice(src []int) []*int

IntSlice converts a slice of int values into a slice of int pointers

func IntValue

func IntValue(v *int) int

IntValue returns the value of the int pointer passed in or 0 if the pointer is nil.

func IntValueMap

func IntValueMap(src map[string]*int) map[string]int

IntValueMap converts a string map of int pointers into a string map of int values

func IntValueSlice

func IntValueSlice(src []*int) []int

IntValueSlice converts a slice of int pointers into a slice of int values

func MillisecondsTimeValue

func MillisecondsTimeValue(v *int64) time.Time

MillisecondsTimeValue converts an int64 pointer to a time.Time value representing milliseconds sinch Epoch or time.Time{} if the pointer is nil.

func NewSession

func NewSession(awsconfig *aws.Config, AWSDebug bool, mc metric.Collector) *session.Session

NewSession returns an AWS session based off of the provided AWS config

func SecondsTimeValue

func SecondsTimeValue(v *int64) time.Time

SecondsTimeValue converts an int64 pointer to a time.Time value representing seconds since Epoch or time.Time{} if the pointer is nil.

func String

func String(v string) *string

String returns a pointer to the string value passed in.

func StringMap

func StringMap(src map[string]string) map[string]*string

StringMap converts a string map of string values into a string map of string pointers

func StringSlice

func StringSlice(src []string) []*string

StringSlice converts a slice of string values into a slice of string pointers

func StringValue

func StringValue(v *string) string

StringValue returns the value of the string pointer passed in or "" if the pointer is nil.

func StringValueMap

func StringValueMap(src map[string]*string) map[string]string

StringValueMap converts a string map of string pointers into a string map of string values

func StringValueSlice

func StringValueSlice(src []*string) []string

StringValueSlice converts a slice of string pointers into a slice of string values

func Time

func Time(v time.Time) *time.Time

Time returns a pointer to the time.Time value passed in.

func TimeMap

func TimeMap(src map[string]time.Time) map[string]*time.Time

TimeMap converts a string map of time.Time values into a string map of time.Time pointers

func TimeSlice

func TimeSlice(src []time.Time) []*time.Time

TimeSlice converts a slice of time.Time values into a slice of time.Time pointers

func TimeUnixMilli

func TimeUnixMilli(t time.Time) int64

TimeUnixMilli returns a Unix timestamp in milliseconds from "January 1, 1970 UTC". The result is undefined if the Unix time cannot be represented by an int64. Which includes calling TimeUnixMilli on a zero Time is undefined.

This utility is useful for service API's such as CloudWatch Logs which require their unix time values to be in milliseconds.

See Go stdlib https://golang.org/pkg/time/#Time.UnixNano for more information.

func TimeValue

func TimeValue(v *time.Time) time.Time

TimeValue returns the value of the time.Time pointer passed in or time.Time{} if the pointer is nil.

func TimeValueMap

func TimeValueMap(src map[string]*time.Time) map[string]time.Time

TimeValueMap converts a string map of time.Time pointers into a string map of time.Time values

func TimeValueSlice

func TimeValueSlice(src []*time.Time) []time.Time

TimeValueSlice converts a slice of time.Time pointers into a slice of time.Time values

Types

type ACMAPI

type ACMAPI interface {
	// StatusACM validates ACM connectivity
	StatusACM() func() error

	// ACMAvailable whether ACM service is available
	ACMAvailable() bool

	// ListCertificates returns a list of certificate objects from ACM
	ListCertificates(ctx context.Context, input *acm.ListCertificatesInput) ([]*acm.CertificateSummary, error)

	// DescribeCertificate is an wrapper around acm.DescribeCertificate
	DescribeCertificate(ctx context.Context, certArn string) (*acm.CertificateDetail, error)
}

ACMAPI is our wrapper ACM API interface

type Cloud

type Cloud struct {
	// contains filtered or unexported fields
}

func (*Cloud) ACMAvailable

func (c *Cloud) ACMAvailable() bool

func (*Cloud) AddELBV2TagsWithContext

func (c *Cloud) AddELBV2TagsWithContext(ctx context.Context, i *elbv2.AddTagsInput) (*elbv2.AddTagsOutput, error)

func (*Cloud) AddListenerCertificates added in v1.1.1

func (*Cloud) AssociateWAF

func (c *Cloud) AssociateWAF(ctx context.Context, resourceArn *string, webACLId *string) (*wafregional.AssociateWebACLOutput, error)

AssociateWAF WAF ACL to resource.

func (*Cloud) CreateEC2TagsWithContext

func (c *Cloud) CreateEC2TagsWithContext(ctx context.Context, i *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)

func (*Cloud) CreateListenerWithContext

func (c *Cloud) CreateListenerWithContext(ctx context.Context, i *elbv2.CreateListenerInput) (*elbv2.CreateListenerOutput, error)

func (*Cloud) CreateLoadBalancerWithContext

func (c *Cloud) CreateLoadBalancerWithContext(ctx context.Context, i *elbv2.CreateLoadBalancerInput) (*elbv2.CreateLoadBalancerOutput, error)

func (*Cloud) CreateRuleWithContext

func (c *Cloud) CreateRuleWithContext(ctx context.Context, i *elbv2.CreateRuleInput) (*elbv2.CreateRuleOutput, error)

func (*Cloud) CreateSecurityGroupWithContext

func (c *Cloud) CreateSecurityGroupWithContext(ctx context.Context, i *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)

func (*Cloud) CreateTargetGroupWithContext

func (c *Cloud) CreateTargetGroupWithContext(ctx context.Context, i *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error)

func (*Cloud) DeleteEC2TagsWithContext

func (c *Cloud) DeleteEC2TagsWithContext(ctx context.Context, i *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)

func (*Cloud) DeleteListenersByArn

func (c *Cloud) DeleteListenersByArn(ctx context.Context, lsArn string) error

func (*Cloud) DeleteLoadBalancerByArn

func (c *Cloud) DeleteLoadBalancerByArn(ctx context.Context, arn string) error

func (*Cloud) DeleteRuleWithContext

func (c *Cloud) DeleteRuleWithContext(ctx context.Context, i *elbv2.DeleteRuleInput) (*elbv2.DeleteRuleOutput, error)

func (*Cloud) DeleteSecurityGroupByID

func (c *Cloud) DeleteSecurityGroupByID(ctx context.Context, groupID string) error

func (*Cloud) DeleteTargetGroupByArn

func (c *Cloud) DeleteTargetGroupByArn(ctx context.Context, arn string) error

DeleteTargetGroupByArn deletes TargetGroup instance by arn

func (*Cloud) DeregisterTargetsWithContext

func (c *Cloud) DeregisterTargetsWithContext(ctx context.Context, i *elbv2.DeregisterTargetsInput) (*elbv2.DeregisterTargetsOutput, error)

func (*Cloud) DescribeCertificate added in v1.1.3

func (c *Cloud) DescribeCertificate(ctx context.Context, certArn string) (*acm.CertificateDetail, error)

func (*Cloud) DescribeELBV2TagsWithContext

func (c *Cloud) DescribeELBV2TagsWithContext(ctx context.Context, i *elbv2.DescribeTagsInput) (*elbv2.DescribeTagsOutput, error)

func (*Cloud) DescribeListenerCertificates added in v1.1.1

func (c *Cloud) DescribeListenerCertificates(ctx context.Context, lsArn string) ([]*elbv2.Certificate, error)

func (*Cloud) DescribeNetworkInterfaces added in v1.1.2

func (c *Cloud) DescribeNetworkInterfaces(ctx context.Context, input *ec2.DescribeNetworkInterfacesInput) ([]*ec2.NetworkInterface, error)

func (*Cloud) DescribeSecurityGroups added in v1.1.3

func (c *Cloud) DescribeSecurityGroups(ctx context.Context, input *ec2.DescribeSecurityGroupsInput) ([]*ec2.SecurityGroup, error)

func (*Cloud) DescribeTargetHealthWithContext

func (c *Cloud) DescribeTargetHealthWithContext(ctx context.Context, i *elbv2.DescribeTargetHealthInput) (*elbv2.DescribeTargetHealthOutput, error)

func (*Cloud) DisassociateWAF

func (c *Cloud) DisassociateWAF(ctx context.Context, resourceArn *string) (*wafregional.DisassociateWebACLOutput, error)

DisassociateWAF WAF ACL from resource.

func (*Cloud) GetClusterName added in v1.1.3

func (c *Cloud) GetClusterName() string

func (*Cloud) GetClusterSubnets

func (c *Cloud) GetClusterSubnets(tagSubnetType string) ([]*ec2.Subnet, error)

func (*Cloud) GetInstancesByIDs

func (c *Cloud) GetInstancesByIDs(instanceIDs []string) ([]*ec2.Instance, error)

func (*Cloud) GetLoadBalancerByArn

func (c *Cloud) GetLoadBalancerByArn(ctx context.Context, arn string) (*elbv2.LoadBalancer, error)

func (*Cloud) GetLoadBalancerByName

func (c *Cloud) GetLoadBalancerByName(ctx context.Context, name string) (*elbv2.LoadBalancer, error)

func (*Cloud) GetResourcesByFilters

func (c *Cloud) GetResourcesByFilters(tagFilters map[string][]string, resourceTypeFilters ...string) ([]string, error)

func (*Cloud) GetRules

func (c *Cloud) GetRules(ctx context.Context, listenerArn string) ([]*elbv2.Rule, error)

func (*Cloud) GetSecurityGroupByID

func (c *Cloud) GetSecurityGroupByID(groupID string) (*ec2.SecurityGroup, error)

func (*Cloud) GetSecurityGroupByName

func (c *Cloud) GetSecurityGroupByName(groupName string) (*ec2.SecurityGroup, error)

func (*Cloud) GetSecurityGroupsByName

func (c *Cloud) GetSecurityGroupsByName(ctx context.Context, names []string) (groups []*ec2.SecurityGroup, err error)

func (*Cloud) GetSubnetsByNameOrID

func (c *Cloud) GetSubnetsByNameOrID(ctx context.Context, nameOrIDs []string) (subnets []*ec2.Subnet, err error)

func (*Cloud) GetTargetGroupByArn

func (c *Cloud) GetTargetGroupByArn(ctx context.Context, arn string) (*elbv2.TargetGroup, error)

func (*Cloud) GetTargetGroupByName

func (c *Cloud) GetTargetGroupByName(ctx context.Context, name string) (*elbv2.TargetGroup, error)

GetTargetGroupByName retrieve TargetGroup instance by name

func (*Cloud) GetVpcID added in v1.1.4

func (c *Cloud) GetVpcID() string

func (*Cloud) GetVpcWithContext added in v1.1.2

func (c *Cloud) GetVpcWithContext(ctx context.Context) (*ec2.Vpc, error)

GetVpcWithContext returns the VPC for the configured VPC ID

func (*Cloud) GetWebACLSummary

func (c *Cloud) GetWebACLSummary(ctx context.Context, resourceArn *string) (*waf.WebACLSummary, error)

GetWebACLSummary return associated summary for resource.

func (*Cloud) IsNodeHealthy

func (c *Cloud) IsNodeHealthy(instanceid string) (bool, error)

IsNodeHealthy returns true if the node is ready

func (*Cloud) ListCertificates added in v1.1.2

func (c *Cloud) ListCertificates(ctx context.Context, input *acm.ListCertificatesInput) ([]*acm.CertificateSummary, error)

ListCertificates returns a list of certificates from ACM Apply a filter to the query using the status parameter

func (*Cloud) ListListenersByLoadBalancer

func (c *Cloud) ListListenersByLoadBalancer(ctx context.Context, lbArn string) ([]*elbv2.Listener, error)

func (*Cloud) ModifyListenerWithContext

func (c *Cloud) ModifyListenerWithContext(ctx context.Context, i *elbv2.ModifyListenerInput) (*elbv2.ModifyListenerOutput, error)

func (*Cloud) ModifyRuleWithContext

func (c *Cloud) ModifyRuleWithContext(ctx context.Context, i *elbv2.ModifyRuleInput) (*elbv2.ModifyRuleOutput, error)

func (*Cloud) ModifyTargetGroupWithContext

func (c *Cloud) ModifyTargetGroupWithContext(ctx context.Context, i *elbv2.ModifyTargetGroupInput) (*elbv2.ModifyTargetGroupOutput, error)

func (*Cloud) RegisterTargetsWithContext

func (c *Cloud) RegisterTargetsWithContext(ctx context.Context, i *elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error)

func (*Cloud) RemoveELBV2TagsWithContext

func (c *Cloud) RemoveELBV2TagsWithContext(ctx context.Context, i *elbv2.RemoveTagsInput) (*elbv2.RemoveTagsOutput, error)

func (*Cloud) RemoveListenerCertificates added in v1.1.1

func (*Cloud) SetIpAddressTypeWithContext

func (c *Cloud) SetIpAddressTypeWithContext(ctx context.Context, i *elbv2.SetIpAddressTypeInput) (*elbv2.SetIpAddressTypeOutput, error)

func (*Cloud) SetSecurityGroupsWithContext

func (c *Cloud) SetSecurityGroupsWithContext(ctx context.Context, i *elbv2.SetSecurityGroupsInput) (*elbv2.SetSecurityGroupsOutput, error)

func (*Cloud) SetSubnetsWithContext

func (c *Cloud) SetSubnetsWithContext(ctx context.Context, i *elbv2.SetSubnetsInput) (*elbv2.SetSubnetsOutput, error)

func (*Cloud) StatusACM

func (c *Cloud) StatusACM() func() error

Status validates ACM connectivity

func (*Cloud) StatusEC2

func (c *Cloud) StatusEC2() func() error

StatusEC2 validates EC2 connectivity

func (*Cloud) StatusELBV2

func (c *Cloud) StatusELBV2() func() error

StatusELBV2 validates ELBV2 connectivity

func (*Cloud) StatusIAM

func (c *Cloud) StatusIAM() func() error

Status validates IAM connectivity

func (*Cloud) WAFRegionalAvailable

func (c *Cloud) WAFRegionalAvailable() bool

func (*Cloud) WebACLExists

func (c *Cloud) WebACLExists(ctx context.Context, webACLId *string) (bool, error)

WebACLExists checks whether the provided ID existing in AWS.

type CloudAPI

type CloudAPI interface {
	ACMAPI
	EC2API
	ELBV2API
	IAMAPI
	ResourceGroupsTaggingAPIAPI
	WAFRegionalAPI

	GetClusterName() string
	GetVpcID() string
}

func New

func New(cfg CloudConfig, clusterName string, mc metric.Collector) (CloudAPI, error)

Initialize the global AWS clients. But due to huge number of aws clients, it's best to have one container AWS client that embed these aws clients. TODO: remove clusterName dependency TODO: remove mc dependency like https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/aws/aws_metrics.go

type CloudConfig

type CloudConfig struct {
	VpcID  string
	Region string

	APIMaxRetries int
	APIDebug      bool
}

configuration for cloud

func (*CloudConfig) BindEnv

func (cfg *CloudConfig) BindEnv() error

func (*CloudConfig) BindFlags

func (cfg *CloudConfig) BindFlags(fs *pflag.FlagSet)

type EC2API

type EC2API interface {
	GetSubnetsByNameOrID(context.Context, []string) ([]*ec2.Subnet, error)

	// StatusEC2 validates EC2 connectivity
	StatusEC2() func() error

	// IsNodeHealthy returns true if the node is ready
	IsNodeHealthy(string) (bool, error)

	// GetInstancesByIDs retrieves ec2 instances by slice of instanceID
	GetInstancesByIDs([]string) ([]*ec2.Instance, error)

	// GetSecurityGroupByID retrieves securityGroup by securityGroupID
	GetSecurityGroupByID(string) (*ec2.SecurityGroup, error)

	// GetSecurityGroupByName retrieves securityGroup by securityGroupName(SecurityGroup names within vpc are unique)
	GetSecurityGroupByName(string) (*ec2.SecurityGroup, error)

	// GetSecurityGroupsByName retrieves securityGroups by securityGroupName(SecurityGroup names within vpc are unique)
	GetSecurityGroupsByName(context.Context, []string) ([]*ec2.SecurityGroup, error)

	// GetClusterSubnets retrieves the subnets associated with the cluster, by matching tags
	GetClusterSubnets(string) ([]*ec2.Subnet, error)

	// DeleteSecurityGroupByID delete securityGroup by securityGroupID
	DeleteSecurityGroupByID(context.Context, string) error

	// DescribeNetworkInterfaces list network interfaces.
	DescribeNetworkInterfaces(context.Context, *ec2.DescribeNetworkInterfacesInput) ([]*ec2.NetworkInterface, error)

	// DescribeSecurityGroups list security groups.
	DescribeSecurityGroups(context.Context, *ec2.DescribeSecurityGroupsInput) ([]*ec2.SecurityGroup, error)

	ModifyNetworkInterfaceAttributeWithContext(context.Context, *ec2.ModifyNetworkInterfaceAttributeInput) (*ec2.ModifyNetworkInterfaceAttributeOutput, error)
	CreateSecurityGroupWithContext(context.Context, *ec2.CreateSecurityGroupInput) (*ec2.CreateSecurityGroupOutput, error)
	AuthorizeSecurityGroupIngressWithContext(context.Context, *ec2.AuthorizeSecurityGroupIngressInput) (*ec2.AuthorizeSecurityGroupIngressOutput, error)
	RevokeSecurityGroupIngressWithContext(context.Context, *ec2.RevokeSecurityGroupIngressInput) (*ec2.RevokeSecurityGroupIngressOutput, error)
	CreateEC2TagsWithContext(context.Context, *ec2.CreateTagsInput) (*ec2.CreateTagsOutput, error)
	DeleteEC2TagsWithContext(context.Context, *ec2.DeleteTagsInput) (*ec2.DeleteTagsOutput, error)

	// GetVpcWithContext returns the VPC for the configured VPC ID
	GetVpcWithContext(context.Context) (*ec2.Vpc, error)
}

EC2API is our wrapper EC2 API interface

type ELBV2API

type ELBV2API interface {
	StatusELBV2() func() error

	GetRules(context.Context, string) ([]*elbv2.Rule, error)

	// ListListenersByLoadBalancer gets all listeners for loadbalancer.
	ListListenersByLoadBalancer(context.Context, string) ([]*elbv2.Listener, error)

	// DeleteListenersByArn deletes listener
	DeleteListenersByArn(context.Context, string) error

	// GetLoadBalancerByName retrieve LoadBalancer instance by arn
	GetLoadBalancerByArn(context.Context, string) (*elbv2.LoadBalancer, error)

	// GetLoadBalancerByName retrieve LoadBalancer instance by name
	GetLoadBalancerByName(context.Context, string) (*elbv2.LoadBalancer, error)

	// DeleteLoadBalancerByArn deletes LoadBalancer instance by arn
	DeleteLoadBalancerByArn(context.Context, string) error

	// GetTargetGroupByArn retrieve TargetGroup instance by arn
	GetTargetGroupByArn(context.Context, string) (*elbv2.TargetGroup, error)

	// GetTargetGroupByName retrieve TargetGroup instance by name
	GetTargetGroupByName(context.Context, string) (*elbv2.TargetGroup, error)

	// DeleteTargetGroupByArn deletes TargetGroup instance by arn
	DeleteTargetGroupByArn(context.Context, string) error

	DescribeTargetGroupAttributesWithContext(context.Context, *elbv2.DescribeTargetGroupAttributesInput) (*elbv2.DescribeTargetGroupAttributesOutput, error)
	ModifyTargetGroupAttributesWithContext(context.Context, *elbv2.ModifyTargetGroupAttributesInput) (*elbv2.ModifyTargetGroupAttributesOutput, error)
	CreateTargetGroupWithContext(context.Context, *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error)
	ModifyTargetGroupWithContext(context.Context, *elbv2.ModifyTargetGroupInput) (*elbv2.ModifyTargetGroupOutput, error)
	RegisterTargetsWithContext(context.Context, *elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error)
	DeregisterTargetsWithContext(context.Context, *elbv2.DeregisterTargetsInput) (*elbv2.DeregisterTargetsOutput, error)
	DescribeTargetHealthWithContext(context.Context, *elbv2.DescribeTargetHealthInput) (*elbv2.DescribeTargetHealthOutput, error)
	CreateRuleWithContext(context.Context, *elbv2.CreateRuleInput) (*elbv2.CreateRuleOutput, error)
	ModifyRuleWithContext(context.Context, *elbv2.ModifyRuleInput) (*elbv2.ModifyRuleOutput, error)
	DeleteRuleWithContext(context.Context, *elbv2.DeleteRuleInput) (*elbv2.DeleteRuleOutput, error)
	SetSecurityGroupsWithContext(context.Context, *elbv2.SetSecurityGroupsInput) (*elbv2.SetSecurityGroupsOutput, error)
	CreateListenerWithContext(context.Context, *elbv2.CreateListenerInput) (*elbv2.CreateListenerOutput, error)
	ModifyListenerWithContext(context.Context, *elbv2.ModifyListenerInput) (*elbv2.ModifyListenerOutput, error)
	DescribeLoadBalancerAttributesWithContext(context.Context, *elbv2.DescribeLoadBalancerAttributesInput) (*elbv2.DescribeLoadBalancerAttributesOutput, error)
	ModifyLoadBalancerAttributesWithContext(context.Context, *elbv2.ModifyLoadBalancerAttributesInput) (*elbv2.ModifyLoadBalancerAttributesOutput, error)
	CreateLoadBalancerWithContext(context.Context, *elbv2.CreateLoadBalancerInput) (*elbv2.CreateLoadBalancerOutput, error)
	SetIpAddressTypeWithContext(context.Context, *elbv2.SetIpAddressTypeInput) (*elbv2.SetIpAddressTypeOutput, error)
	SetSubnetsWithContext(context.Context, *elbv2.SetSubnetsInput) (*elbv2.SetSubnetsOutput, error)

	DescribeELBV2TagsWithContext(context.Context, *elbv2.DescribeTagsInput) (*elbv2.DescribeTagsOutput, error)
	AddELBV2TagsWithContext(context.Context, *elbv2.AddTagsInput) (*elbv2.AddTagsOutput, error)
	RemoveELBV2TagsWithContext(context.Context, *elbv2.RemoveTagsInput) (*elbv2.RemoveTagsOutput, error)

	DescribeListenerCertificates(context.Context, string) ([]*elbv2.Certificate, error)
	AddListenerCertificates(context.Context, *elbv2.AddListenerCertificatesInput) (*elbv2.AddListenerCertificatesOutput, error)
	RemoveListenerCertificates(context.Context, *elbv2.RemoveListenerCertificatesInput) (*elbv2.RemoveListenerCertificatesOutput, error)
}

type HealthChecker

type HealthChecker struct {
	// contains filtered or unexported fields
}

func NewHealthChecker

func NewHealthChecker(cloud CloudAPI) *HealthChecker

Constructs a new healthChecker

func (*HealthChecker) Check

func (c *HealthChecker) Check(_ *http.Request) error

TODO, validate the call health check frequency

func (*HealthChecker) Name

func (c *HealthChecker) Name() string

type IAMAPI

type IAMAPI interface {
	// StatusIAM validates IAM  connectivity
	StatusIAM() func() error
}

IAMAPI is our wrapper IAM API interface

type ResourceGroupsTaggingAPIAPI

type ResourceGroupsTaggingAPIAPI interface {
	// GetResourcesByFilters fetches resources ARNs by tagFilters and 0 or more resourceTypesFilters
	GetResourcesByFilters(tagFilters map[string][]string, resourceTypeFilters ...string) ([]string, error)

	TagResourcesWithContext(context.Context, *resourcegroupstaggingapi.TagResourcesInput) (*resourcegroupstaggingapi.TagResourcesOutput, error)
	UntagResourcesWithContext(context.Context, *resourcegroupstaggingapi.UntagResourcesInput) (*resourcegroupstaggingapi.UntagResourcesOutput, error)
}

type WAFRegionalAPI

type WAFRegionalAPI interface {
	WebACLExists(ctx context.Context, webACLId *string) (bool, error)
	GetWebACLSummary(ctx context.Context, resourceArn *string) (*waf.WebACLSummary, error)
	AssociateWAF(ctx context.Context, resourceArn *string, webACLId *string) (*wafregional.AssociateWebACLOutput, error)
	DisassociateWAF(ctx context.Context, resourceArn *string) (*wafregional.DisassociateWebACLOutput, error)

	// WAFRegionalAvailable whether WAFRegional service are available.
	WAFRegionalAvailable() bool
}

Jump to

Keyboard shortcuts

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