mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-07 01:56:57 +02:00
Add SetIdentifier to EndpointKey
This commit is contained in:
parent
4417ad4894
commit
a9ae5ea43a
@ -166,6 +166,7 @@ type ProviderSpecific []ProviderSpecificProperty
|
|||||||
type EndpointKey struct {
|
type EndpointKey struct {
|
||||||
DNSName string
|
DNSName string
|
||||||
RecordType string
|
RecordType string
|
||||||
|
SetIdentifier string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Endpoint is a high-level way of a connection between a service and an IP
|
// Endpoint is a high-level way of a connection between a service and an IP
|
||||||
@ -267,6 +268,15 @@ func (e *Endpoint) DeleteProviderSpecificProperty(key string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Key returns the EndpointKey of the Endpoint.
|
||||||
|
func (e *Endpoint) Key() EndpointKey {
|
||||||
|
return EndpointKey{
|
||||||
|
DNSName: e.DNSName,
|
||||||
|
RecordType: e.RecordType,
|
||||||
|
SetIdentifier: e.SetIdentifier,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (e *Endpoint) String() string {
|
func (e *Endpoint) String() string {
|
||||||
return fmt.Sprintf("%s %d IN %s %s %s %s", e.DNSName, e.RecordTTL, e.RecordType, e.SetIdentifier, e.Targets, e.ProviderSpecific)
|
return fmt.Sprintf("%s %d IN %s %s %s %s", e.DNSName, e.RecordTTL, e.RecordType, e.SetIdentifier, e.Targets, e.ProviderSpecific)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user