mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 08:44:17 -04:00
remove unused funcs (#724)
This commit is contained in:
committed by
Miek Gieben
parent
92dd947c51
commit
2ec96e0bb5
@@ -368,27 +368,3 @@ func (dns *dnsControl) EndpointsList() api.EndpointsList {
|
||||
|
||||
return epl
|
||||
}
|
||||
|
||||
// ServicesByNamespace returns a map of:
|
||||
//
|
||||
// namespacename :: [ kubernetesService ]
|
||||
func (dns *dnsControl) ServicesByNamespace() map[string][]api.Service {
|
||||
k8sServiceList := dns.ServiceList()
|
||||
items := make(map[string][]api.Service, len(k8sServiceList))
|
||||
for _, i := range k8sServiceList {
|
||||
namespace := i.Namespace
|
||||
items[namespace] = append(items[namespace], *i)
|
||||
}
|
||||
|
||||
return items
|
||||
}
|
||||
|
||||
// ServiceInNamespace returns the Service that matches servicename in the namespace
|
||||
func (dns *dnsControl) ServiceInNamespace(namespace, servicename string) *api.Service {
|
||||
svcObj, err := dns.svcLister.Services(namespace).Get(servicename)
|
||||
if err != nil {
|
||||
// TODO(...): should return err here
|
||||
return nil
|
||||
}
|
||||
return svcObj
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user