mirror of
https://github.com/kubernetes-sigs/external-dns.git
synced 2025-08-06 01:26:59 +02:00
Add SetIdentifier to EndpointKey
This commit is contained in:
parent
4417ad4894
commit
a9ae5ea43a
@ -164,8 +164,9 @@ type ProviderSpecific []ProviderSpecificProperty
|
||||
|
||||
// EndpointKey is the type of a map key for separating endpoints or targets.
|
||||
type EndpointKey struct {
|
||||
DNSName string
|
||||
RecordType string
|
||||
DNSName string
|
||||
RecordType string
|
||||
SetIdentifier string
|
||||
}
|
||||
|
||||
// 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 {
|
||||
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