MCPcopy
hub / github.com/kubernetes/client-go / getDelegate

Method getDelegate

restmapper/discovery.go:194–209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192}
193
194func (d *DeferredDiscoveryRESTMapper) getDelegate() (meta.RESTMapper, error) {
195 d.initMu.Lock()
196 defer d.initMu.Unlock()
197
198 if d.delegate != nil {
199 return d.delegate, nil
200 }
201
202 groupResources, err := GetAPIGroupResources(d.cl)
203 if err != nil {
204 return nil, err
205 }
206
207 d.delegate = NewDiscoveryRESTMapper(groupResources)
208 return d.delegate, err
209}
210
211// Reset resets the internally cached Discovery information and will
212// cause the next mapping request to re-discover.

Callers 8

KindForMethod · 0.95
KindsForMethod · 0.95
ResourceForMethod · 0.95
ResourcesForMethod · 0.95
RESTMappingMethod · 0.95
RESTMappingsMethod · 0.95
ResourceSingularizerMethod · 0.95
StringMethod · 0.95

Calls 2

GetAPIGroupResourcesFunction · 0.85
NewDiscoveryRESTMapperFunction · 0.85

Tested by

no test coverage detected