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

Method RESTMapping

restmapper/discovery.go:285–296  ·  view source on GitHub ↗

RESTMapping identifies a preferred resource mapping for the provided group kind.

(gk schema.GroupKind, versions ...string)

Source from the content-addressed store, hash-verified

283// RESTMapping identifies a preferred resource mapping for the
284// provided group kind.
285func (d *DeferredDiscoveryRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (m *meta.RESTMapping, err error) {
286 del, err := d.getDelegate()
287 if err != nil {
288 return nil, err
289 }
290 m, err = del.RESTMapping(gk, versions...)
291 if err != nil && !d.cl.Fresh() {
292 d.Reset()
293 m, err = d.RESTMapping(gk, versions...)
294 }
295 return
296}
297
298// RESTMappings returns the RESTMappings for the provided group kind
299// in a rough internal preferred order. If no kind is found, it will

Callers

nothing calls this directly

Calls 3

getDelegateMethod · 0.95
ResetMethod · 0.95
FreshMethod · 0.65

Tested by

no test coverage detected