awsroute53

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const (
	ConflictingDomainExists = "ConflictingDomainExists"
)

Route53 related const

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSRoute53

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

AWSRoute53 handles route53 related functions

func NewAWSRoute53

func NewAWSRoute53(sess *session.Session) *AWSRoute53

NewAWSRoute53 creates a AWSRoute53 instance

func (*AWSRoute53) DeleteDNSRecord

func (r *AWSRoute53) DeleteDNSRecord(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) error

DeleteDNSRecord deletes one dns record.

func (*AWSRoute53) DeleteHostedZone

func (r *AWSRoute53) DeleteHostedZone(ctx context.Context, hostedZoneID string) error

DeleteHostedZone deletes the hostedZone. Please delete all dns records before DeleteHostedZone.

func (*AWSRoute53) GetDNSRecord

func (r *AWSRoute53) GetDNSRecord(ctx context.Context, dnsName string, hostedZoneID string) (string, error)

GetDNSRecord returns the host ip for the dnsname.

func (*AWSRoute53) GetHostedZoneIDByName

func (r *AWSRoute53) GetHostedZoneIDByName(ctx context.Context, domainName string, vpcID string, vpcRegion string, private bool) (hostedZoneID string, err error)

GetHostedZoneIDByName gets the hostedZoneID.

func (*AWSRoute53) GetOrCreateHostedZoneIDByName

func (r *AWSRoute53) GetOrCreateHostedZoneIDByName(ctx context.Context, domainName string, vpcID string, vpcRegion string, private bool) (hostedZoneID string, err error)

GetOrCreateHostedZoneIDByName gets the hostedZoneID. If hostedZone does not exist, will create it.

func (*AWSRoute53) LookupLocalDNS

func (r *AWSRoute53) LookupLocalDNS(ctx context.Context, dnsName string) (dnsIP string, err error)

LookupLocalDNS looks up the given host using the local resolver.

func (*AWSRoute53) UpdateDNSRecord

func (r *AWSRoute53) UpdateDNSRecord(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) error

UpdateDNSRecord updates the service's route53 record

func (*AWSRoute53) WaitDNSRecordUpdated

func (r *AWSRoute53) WaitDNSRecordUpdated(ctx context.Context, dnsName string, hostIP string, hostedZoneID string) (dnsIP string, err error)

WaitDNSRecordUpdated waits till DNS lookup returns the expected hostIP.

Jump to

Keyboard shortcuts

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