aws

package
v0.0.0-...-68a8344 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSConfig

type AWSConfig struct {
	DomainFilter         endpoint.DomainFilter
	ZoneIDFilter         provider.ZoneIDFilter
	ZoneTypeFilter       provider.ZoneTypeFilter
	ZoneTagFilter        provider.ZoneTagFilter
	BatchChangeSize      int
	BatchChangeInterval  time.Duration
	EvaluateTargetHealth bool
	AssumeRole           string
	APIRetries           int
	PreferCNAME          bool
	DryRun               bool
}

AWSConfig contains configuration to create a new AWS provider.

type AWSProvider

type AWSProvider struct {
	provider.BaseProvider
	// contains filtered or unexported fields
}

AWSProvider is an implementation of Provider for AWS Route53.

func NewAWSProvider

func NewAWSProvider(awsConfig AWSConfig) (*AWSProvider, error)

NewAWSProvider initializes a new AWS Route53 based Provider.

func (*AWSProvider) ApplyChanges

func (p *AWSProvider) ApplyChanges(ctx context.Context, changes *plan.Changes) error

ApplyChanges applies a given set of changes in a given zone.

func (*AWSProvider) CreateRecords

func (p *AWSProvider) CreateRecords(ctx context.Context, endpoints []*endpoint.Endpoint) error

CreateRecords creates a given set of DNS records in the given hosted zone.

func (*AWSProvider) DeleteRecords

func (p *AWSProvider) DeleteRecords(ctx context.Context, endpoints []*endpoint.Endpoint) error

DeleteRecords deletes a given set of DNS records in a given zone.

func (*AWSProvider) Records

func (p *AWSProvider) Records(ctx context.Context) (endpoints []*endpoint.Endpoint, _ error)

Records returns the list of records in a given hosted zone.

func (*AWSProvider) UpdateRecords

func (p *AWSProvider) UpdateRecords(ctx context.Context, endpoints, _ []*endpoint.Endpoint) error

UpdateRecords updates a given set of old records to a new set of records in a given hosted zone.

func (*AWSProvider) Zones

func (p *AWSProvider) Zones(ctx context.Context) (map[string]*route53.HostedZone, error)

Zones returns the list of hosted zones.

type Route53API

type Route53API interface {
	ListResourceRecordSetsPagesWithContext(ctx context.Context, input *route53.ListResourceRecordSetsInput, fn func(resp *route53.ListResourceRecordSetsOutput, lastPage bool) (shouldContinue bool), opts ...request.Option) error
	ChangeResourceRecordSetsWithContext(ctx context.Context, input *route53.ChangeResourceRecordSetsInput, opts ...request.Option) (*route53.ChangeResourceRecordSetsOutput, error)
	CreateHostedZoneWithContext(ctx context.Context, input *route53.CreateHostedZoneInput, opts ...request.Option) (*route53.CreateHostedZoneOutput, error)
	ListHostedZonesPagesWithContext(ctx context.Context, input *route53.ListHostedZonesInput, fn func(resp *route53.ListHostedZonesOutput, lastPage bool) (shouldContinue bool), opts ...request.Option) error
	ListTagsForResourceWithContext(ctx context.Context, input *route53.ListTagsForResourceInput, opts ...request.Option) (*route53.ListTagsForResourceOutput, error)
}

Route53API is the subset of the AWS Route53 API that we actually use. Add methods as required. Signatures must match exactly. mostly taken from: https://github.com/kubernetes/kubernetes/blob/853167624edb6bc0cfdcdfb88e746e178f5db36c/federation/pkg/dnsprovider/providers/aws/route53/stubs/route53api.go

Jump to

Keyboard shortcuts

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