Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UnstructuredObjectTyper ¶
type UnstructuredObjectTyper struct { }
UnstructuredObjectTyper provides a runtime.ObjectTyper implementation for runtime.Unstructured object based on discovery information.
func NewUnstructuredObjectTyper ¶
func NewUnstructuredObjectTyper() *UnstructuredObjectTyper
NewUnstructuredObjectTyper returns a runtime.ObjectTyper for unstructured objects based on discovery information. It accepts a list of fallback typers for handling objects that are not runtime.Unstructured. It does not delegate the Recognizes check, only ObjectKinds. TODO this only works for the apiextensions server and doesn't recognize any types. Move to point of use.
func (*UnstructuredObjectTyper) ObjectKinds ¶
func (d *UnstructuredObjectTyper) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error)
ObjectKinds returns a slice of one element with the group,version,kind of the provided object, or an error if the object is not runtime.Unstructured or has no group,version,kind information. unversionedType will always be false because runtime.Unstructured object should always have group,version,kind information set.
func (*UnstructuredObjectTyper) Recognizes ¶
func (d *UnstructuredObjectTyper) Recognizes(gvk schema.GroupVersionKind) bool
Recognizes returns true if the provided group,version,kind was in the discovery information.