Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDynamicRESTMapper ¶
func NewDynamicRESTMapper(cfg *rest.Config, opts ...DynamicRESTMapperOption) (meta.RESTMapper, error)
NewDynamicRESTMapper returns a dynamic RESTMapper for cfg. The dynamic RESTMapper dynamically discovers resource types at runtime. opts configure the RESTMapper.
Types ¶
type DynamicRESTMapperOption ¶
type DynamicRESTMapperOption func(*dynamicRESTMapper) error
DynamicRESTMapperOption is a functional option on the dynamicRESTMapper.
var WithExperimentalLazyMapper DynamicRESTMapperOption = func(drm *dynamicRESTMapper) error { drm.useLazyRestmapper = true return nil }
WithExperimentalLazyMapper enables experimental more advanced Lazy Restmapping mechanism.
var WithLazyDiscovery DynamicRESTMapperOption = func(drm *dynamicRESTMapper) error { drm.lazy = true return nil }
WithLazyDiscovery prevents the RESTMapper from discovering REST mappings until an API call is made.
func WithCustomMapper ¶
func WithCustomMapper(newMapper func() (meta.RESTMapper, error)) DynamicRESTMapperOption
WithCustomMapper supports setting a custom RESTMapper refresher instead of the default method, which uses a discovery client.
This exists mainly for testing, but can be useful if you need tighter control over how discovery is performed, which discovery endpoints are queried, etc.
func WithLimiter ¶
func WithLimiter(lim *rate.Limiter) DynamicRESTMapperOption
WithLimiter sets the RESTMapper's underlying limiter to lim.