Merge pull request #63625 from liggitt/discovery-cleanup-2

Automatic merge from submit-queue (batch tested with PRs 64416, 63625, 60967, 64767, 64588). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Collapse memcached discovery client onto parallelized discovery method

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-06-20 07:12:18 -07:00 committed by GitHub
commit f637a259ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -67,20 +67,7 @@ func (d *memCacheClient) ServerResourcesForGroupVersion(groupVersion string) (*m
// ServerResources returns the supported resources for all groups and versions.
func (d *memCacheClient) ServerResources() ([]*metav1.APIResourceList, error) {
apiGroups, err := d.ServerGroups()
if err != nil {
return nil, err
}
groupVersions := metav1.ExtractGroupVersions(apiGroups)
result := []*metav1.APIResourceList{}
for _, groupVersion := range groupVersions {
resources, err := d.ServerResourcesForGroupVersion(groupVersion)
if err != nil {
return nil, err
}
result = append(result, resources)
}
return result, nil
return discovery.ServerResources(d)
}
func (d *memCacheClient) ServerGroups() (*metav1.APIGroupList, error) {