mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
rebase: update kubernetes to v1.23.0
updating go dependency to latest kubernetes released version i.e v1.23.0 Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
42403e2ba7
commit
5762da3e91
12
vendor/k8s.io/apimachinery/pkg/api/meta/lazy.go
generated
vendored
12
vendor/k8s.io/apimachinery/pkg/api/meta/lazy.go
generated
vendored
@ -32,7 +32,7 @@ type lazyObject struct {
|
||||
mapper RESTMapper
|
||||
}
|
||||
|
||||
// NewLazyObjectLoader handles unrecoverable errors when creating a RESTMapper / ObjectTyper by
|
||||
// NewLazyRESTMapperLoader handles unrecoverable errors when creating a RESTMapper / ObjectTyper by
|
||||
// returning those initialization errors when the interface methods are invoked. This defers the
|
||||
// initialization and any server calls until a client actually needs to perform the action.
|
||||
func NewLazyRESTMapperLoader(fn func() (RESTMapper, error)) RESTMapper {
|
||||
@ -52,7 +52,7 @@ func (o *lazyObject) init() error {
|
||||
return o.err
|
||||
}
|
||||
|
||||
var _ RESTMapper = &lazyObject{}
|
||||
var _ ResettableRESTMapper = &lazyObject{}
|
||||
|
||||
func (o *lazyObject) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error) {
|
||||
if err := o.init(); err != nil {
|
||||
@ -102,3 +102,11 @@ func (o *lazyObject) ResourceSingularizer(resource string) (singular string, err
|
||||
}
|
||||
return o.mapper.ResourceSingularizer(resource)
|
||||
}
|
||||
|
||||
func (o *lazyObject) Reset() {
|
||||
o.lock.Lock()
|
||||
defer o.lock.Unlock()
|
||||
if o.loaded && o.err == nil {
|
||||
MaybeResetRESTMapper(o.mapper)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user