mirror of
https://github.com/kubernetes/client-go.git
synced 2025-08-31 14:44:50 +00:00
Collapse memcached discovery client onto parallelized discovery method
Kubernetes-commit: af7d3b21f85d12e3296d8b237c7181d515ee530c
This commit is contained in:
committed by
Kubernetes Publisher
parent
70f02b11c6
commit
212413e762
@@ -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) {
|
||||
|
Reference in New Issue
Block a user