adapter

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ALB

type ALB interface {
	DescribeLoadBalancers(input *aws_alb.DescribeLoadBalancersInput) (*aws_alb.DescribeLoadBalancersOutput, error)
}

ALB represents the subset of AWS operations needed for dns_updater.go

type AWSAdapterConfig

type AWSAdapterConfig struct {
	Region        string
	HostedZoneID  string
	ELBLabelValue string
	ALBNames      []string
	ALBClient     ALB
	ELBClient     elb.ELB
	ELBFinder     FindELBsFunc
}

AWSAdapterConfig describes the configuration of a FrontendAdapter which uses AWS ELBs and/or ALBs

type ConsolidatedRecord

type ConsolidatedRecord struct {
	Name            string
	PointsTo        string
	AliasHostedZone string
	TTL             int64
}

ConsolidatedRecord describes how a DNS name maps to a static load balancer or AWS ELBs or ALBs.

type DNSDetails

type DNSDetails struct {
	DNSName      string
	HostedZoneID string
}

DNSDetails defines a DNS name and, optionally, how it maps to an AWS Route53 zone

type FindELBsFunc

type FindELBsFunc func(elb.ELB, string) (map[string]elb.LoadBalancerDetails, error)

FindELBsFunc defines a function which find ELBs based on a label

type FrontendAdapter

type FrontendAdapter interface {
	Initialise() (map[string]DNSDetails, error)
	CreateChange(action string, host string, details DNSDetails, recordExists bool, existingRecord *ConsolidatedRecord) *route53.Change
	IsManaged(*route53.ResourceRecordSet) (*ConsolidatedRecord, bool)
}

FrontendAdapter defines operations which vary based on the type of load balancer being used for ingress.

func NewAWSAdapter

func NewAWSAdapter(config *AWSAdapterConfig) (FrontendAdapter, error)

NewAWSAdapter creates a FrontendAdapter which interacts with AWS ELBs or ALBs.

func NewStaticHostnameAdapter

func NewStaticHostnameAdapter(addressesWithScheme map[string]string, ttl time.Duration) FrontendAdapter

NewStaticHostnameAdapter creates a FrontendAdapter which interacts with load balancers accessed by static hostnames.

Jump to

Keyboard shortcuts

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