endpoint

package
Version: v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RecordTypeA is a RecordType enum value
	RecordTypeA = "A"
	// RecordTypeCNAME is a RecordType enum value
	RecordTypeCNAME = "CNAME"
	// RecordTypeTXT is a RecordType enum value
	RecordTypeTXT = "TXT"
)
View Source
const (

	// OwnerLabelKey is the name of the label that defines the owner of an Endpoint.
	OwnerLabelKey = "owner"
	// ResourceLabelKey is the name of the label that identifies k8s resource which wants to acquire the DNS name
	ResourceLabelKey = "resource"

	// AWSSDDescriptionLabel label responsible for storing raw owner/resource combination information in the Labels
	// supposed to be inserted by AWS SD Provider, and parsed into OwnerLabelKey and ResourceLabelKey key by AWS SD Registry
	AWSSDDescriptionLabel = "aws-sd-description"
)

Variables

View Source
var (
	// ErrInvalidHeritage is returned when heritage was not found, or different heritage is found
	ErrInvalidHeritage = errors.New("heritage is unknown or not found")
)

Functions

This section is empty.

Types

type Endpoint

type Endpoint struct {
	// The hostname of the DNS record
	DNSName string
	// The targets the DNS record points to
	Targets Targets
	// RecordType type of record, e.g. CNAME, A, TXT etc
	RecordType string
	// TTL for the record
	RecordTTL TTL
	// Labels stores labels defined for the Endpoint
	Labels Labels
}

Endpoint is a high-level way of a connection between a service and an IP

func NewEndpoint added in v0.2.0

func NewEndpoint(dnsName, recordType string, targets ...string) *Endpoint

NewEndpoint initialization method to be used to create an endpoint

func NewEndpointWithTTL added in v0.4.6

func NewEndpointWithTTL(dnsName, recordType string, ttl TTL, targets ...string) *Endpoint

NewEndpointWithTTL initialization method to be used to create an endpoint with a TTL struct

func (*Endpoint) String added in v0.3.0

func (e *Endpoint) String() string

type Labels added in v0.5.0

type Labels map[string]string

Labels store metadata related to the endpoint it is then stored in a persistent storage via serialization

func NewLabels added in v0.5.0

func NewLabels() Labels

NewLabels returns empty Labels

func NewLabelsFromString added in v0.5.0

func NewLabelsFromString(labelText string) (Labels, error)

NewLabelsFromString constructs endpoints labels from a provided format string if heritage set to another value is found then error is returned no heritage automatically assumes is not owned by external-dns and returns invalidHeritage error

func (Labels) Serialize added in v0.5.0

func (l Labels) Serialize(withQuotes bool) string

Serialize transforms endpoints labels into a external-dns recognizable format string withQuotes adds additional quotes

type TTL added in v0.4.6

type TTL int64

TTL is a structure defining the TTL of a DNS record

func (TTL) IsConfigured added in v0.4.6

func (ttl TTL) IsConfigured() bool

IsConfigured returns true if TTL is configured, false otherwise

type Targets added in v0.5.0

type Targets []string

Targets is a representation of a list of targets for an endpoint.

func NewTargets added in v0.5.0

func NewTargets(target ...string) Targets

NewTargets is a convenience method to create a new Targets object from a vararg of strings

func (Targets) IsLess added in v0.5.0

func (t Targets) IsLess(o Targets) bool

IsLess should fulfill the requirement to compare two targets and chosse the 'lesser' one. In the past target was a simple string so simple string comparison could be used. Now we define 'less' as either being the shorter list of targets or where the first entry is less. FIXME We really need to define under which circumstances a list Targets is considered 'less' than another.

func (Targets) Len added in v0.5.0

func (t Targets) Len() int

func (Targets) Less added in v0.5.0

func (t Targets) Less(i, j int) bool

func (Targets) Same added in v0.5.0

func (t Targets) Same(o Targets) bool

Same compares to Targets and returns true if they are completely identical

func (Targets) String added in v0.5.0

func (t Targets) String() string

func (Targets) Swap added in v0.5.0

func (t Targets) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL