Documentation ¶
Index ¶
- func GetSchema() *schema.Instance
- func IsBuiltIn(kind string) bool
- func New(sharedInformers informers.SharedInformerFactory, spec schema.ResourceSpec) (runtime.Source, error)
- type Type
- func (p *Type) ExtractObject(o interface{}) metav1.Object
- func (p *Type) ExtractResource(o interface{}) proto.Message
- func (p *Type) GetSpec() *schema.ResourceSpec
- func (p *Type) IsEqual(o1 interface{}, o2 interface{}) bool
- func (p *Type) NewInformer(sharedInformers informers.SharedInformerFactory) cache.SharedIndexInformer
- func (p *Type) ParseJSON(input []byte) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(sharedInformers informers.SharedInformerFactory, spec schema.ResourceSpec) (runtime.Source, error)
New creates a new built-in source. If the type is not built-in, returns an error.
Types ¶
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
Type provides functions for a single built-in type.
func GetType ¶
GetType returns the built-in Type for the given kind, or nil if the kind is unsupported.
func (*Type) ExtractObject ¶
ExtractObject extracts the k8s object metadata from the given object of this type.
func (*Type) ExtractResource ¶
ExtractResource extracts the resource proto from the given object of this type.
func (*Type) GetSpec ¶
func (p *Type) GetSpec() *schema.ResourceSpec
GetSpec returns the schema.ResourceSpec associated with this built-in type.
func (*Type) NewInformer ¶
func (p *Type) NewInformer(sharedInformers informers.SharedInformerFactory) cache.SharedIndexInformer
NewInformer creates a new k8s informer for resources of this type.
Click to show internal directories.
Click to hide internal directories.