Documentation ¶
Index ¶
Constants ¶
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" // RecordTypeSRV is a RecordType enum value RecordTypeSRV = "SRV" // RecordTypeNS is a RecordType enum value RecordTypeNS = "NS" // RecordTypePTR is a RecordType enum value RecordTypePTR = "PTR" )
Variables ¶
var ErrInvalidHeritage = errors.New("heritage is unknown or not found")
ErrInvalidHeritage is returned when heritage was not found, or different heritage is found
Functions ¶
This section is empty.
Types ¶
type DomainFilter ¶
type DomainFilter struct { // Filters define what domains to match Filters []string // contains filtered or unexported fields }
DomainFilter holds a lists of valid domain names
func NewDomainFilter ¶
func NewDomainFilter(domainFilters []string) DomainFilter
NewDomainFilter returns a new DomainFilter given a comma separated list of domains
func NewDomainFilterWithExclusions ¶
func NewDomainFilterWithExclusions(domainFilters []string, excludeDomains []string) DomainFilter
NewDomainFilterWithExclusions returns a new DomainFilter, given a list of matches and exclusions
func NewRegexDomainFilter ¶
func NewRegexDomainFilter(regexDomainFilter *regexp.Regexp, regexDomainExclusion *regexp.Regexp) DomainFilter
NewRegexDomainFilter returns a new DomainFilter given a regular expression
func (DomainFilter) IsConfigured ¶
func (df DomainFilter) IsConfigured() bool
IsConfigured returns true if any inclusion or exclusion rules have been specified.
func (DomainFilter) MarshalJSON ¶
func (df DomainFilter) MarshalJSON() ([]byte, error)
func (DomainFilter) Match ¶
func (df DomainFilter) Match(domain string) bool
Match checks whether a domain can be found in the DomainFilter. RegexFilter takes precedence over Filters
func (DomainFilter) MatchParent ¶
func (df DomainFilter) MatchParent(domain string) bool
MatchParent checks wether DomainFilter matches a given parent domain.
func (*DomainFilter) UnmarshalJSON ¶
func (df *DomainFilter) UnmarshalJSON(b []byte) error
type DomainFilterInterface ¶
DomainFilterInterface defines the interface to select matching domains for a specific provider or runtime
type Endpoint ¶
type Endpoint struct { // The hostname of the DNS record DNSName string `json:"dnsName,omitempty"` // The targets the DNS record points to Targets Targets `json:"targets,omitempty"` // RecordType type of record, e.g. CNAME, A, SRV, TXT etc RecordType string `json:"recordType,omitempty"` // Identifier to distinguish multiple records with the same name and type (e.g. Route53 records with routing policies other than 'simple') SetIdentifier string `json:"setIdentifier,omitempty"` // TTL for the record RecordTTL TTL `json:"recordTTL,omitempty"` // Labels stores labels defined for the Endpoint // +optional Labels Labels `json:"labels,omitempty"` // ProviderSpecific stores provider specific config // +optional ProviderSpecific ProviderSpecific `json:"providerSpecific,omitempty"` }
Endpoint is a high-level way of a connection between a service and an IP
func NewEndpoint ¶
NewEndpoint initialization method to be used to create an endpoint
func NewEndpointWithTTL ¶
NewEndpointWithTTL initialization method to be used to create an endpoint with a TTL struct
func (*Endpoint) GetProviderSpecificProperty ¶
func (e *Endpoint) GetProviderSpecificProperty(key string) (ProviderSpecificProperty, bool)
GetProviderSpecificProperty returns a ProviderSpecificProperty if the property exists.
func (*Endpoint) WithProviderSpecific ¶
WithProviderSpecific attaches a key/value pair to the Endpoint and returns the Endpoint. This can be used to pass additional data through the stages of ExternalDNS's Endpoint processing. The assumption is that most of the time this will be provider specific metadata that doesn't warrant its own field on the Endpoint object itself. It differs from Labels in the fact that it's not persisted in the Registry but only kept in memory during a single record synchronization.
func (*Endpoint) WithSetIdentifier ¶
WithSetIdentifier applies the given set identifier to the endpoint.
type Labels ¶
Labels store metadata related to the endpoint it is then stored in a persistent storage via serialization
func NewLabelsFromString ¶
NewLabelsFromString constructs endpoint 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
type MatchAllDomainFilters ¶
type MatchAllDomainFilters []DomainFilterInterface
func (MatchAllDomainFilters) IsConfigured ¶
func (f MatchAllDomainFilters) IsConfigured() bool
func (MatchAllDomainFilters) Match ¶
func (f MatchAllDomainFilters) Match(domain string) bool
type ProviderSpecific ¶
type ProviderSpecific []ProviderSpecificProperty
ProviderSpecific holds configuration which is specific to individual DNS providers
type ProviderSpecificProperty ¶
type ProviderSpecificProperty struct { Name string `json:"name,omitempty"` Value string `json:"value,omitempty"` }
ProviderSpecificProperty holds the name and value of a configuration which is specific to individual DNS providers
type TTL ¶
type TTL int64
TTL is a structure defining the TTL of a DNS record
func (TTL) IsConfigured ¶
IsConfigured returns true if TTL is configured, false otherwise
type TargetFilterInterface ¶
TargetFilterInterface defines the interface to select matching targets for a specific provider or runtime
type TargetNetFilter ¶
type TargetNetFilter struct { // FilterNets define what targets to match FilterNets []*net.IPNet // contains filtered or unexported fields }
TargetNetFilter holds a lists of valid target names
func NewTargetNetFilter ¶
func NewTargetNetFilter(targetFilterNets []string) TargetNetFilter
NewTargetNetFilter returns a new TargetNetFilter given a comma separated list of targets
func NewTargetNetFilterWithExclusions ¶
func NewTargetNetFilterWithExclusions(targetFilterNets []string, excludeNets []string) TargetNetFilter
NewTargetNetFilterWithExclusions returns a new TargetNetFilter, given a list of matches and exclusions
func (TargetNetFilter) IsConfigured ¶
func (tf TargetNetFilter) IsConfigured() bool
IsConfigured returns true if TargetFilter is configured, false otherwise
func (TargetNetFilter) Match ¶
func (tf TargetNetFilter) Match(target string) bool
Match checks whether a target can be found in the TargetNetFilter.
type Targets ¶
type Targets []string
Targets is a representation of a list of targets for an endpoint.
func NewTargets ¶
NewTargets is a convenience method to create a new Targets object from a vararg of strings
func (Targets) IsLess ¶
IsLess should fulfill the requirement to compare two targets and choose 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.