sigs.k8s.io/external-dns@v0.14.1/registry/registry.go (about) 1 /* 2 Copyright 2017 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package registry 18 19 import ( 20 "context" 21 22 "sigs.k8s.io/external-dns/endpoint" 23 "sigs.k8s.io/external-dns/plan" 24 ) 25 26 // Registry is an interface which should enables ownership concept in external-dns 27 // Records() returns ALL records registered with DNS provider 28 // each entry includes owner information 29 // ApplyChanges(changes *plan.Changes) propagates the changes to the DNS Provider API and correspondingly updates ownership depending on type of registry being used 30 type Registry interface { 31 Records(ctx context.Context) ([]*endpoint.Endpoint, error) 32 ApplyChanges(ctx context.Context, changes *plan.Changes) error 33 AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoint.Endpoint, error) 34 GetDomainFilter() endpoint.DomainFilter 35 OwnerID() string 36 }