Documentation ¶
Overview ¶
Package common provides cache.TransformFunc's which are common to all types
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUnstructured ¶
func GetUnstructured(obj any) (*unstructured.Unstructured, bool, error)
GetUnstructured retrieves an unstructured object from the provided input. If this is a signal object (like cache.DeletedFinalStateUnknown), returns true, indicating that this wasn't an unstructured object, but doesn't need to be processed by our transform function
Types ¶
type DefaultFields ¶
type DefaultFields struct {
Cache SummaryCache
}
DefaultFields produces a VirtualTransformFunc through GetTransform() that applies to all k8s types
func (*DefaultFields) TransformCommon ¶
func (d *DefaultFields) TransformCommon(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
TransformCommon implements virtual.VirtualTransformFunc, and adds reserved fields/summary
type FakeSummaryCache ¶
type FakeSummaryCache struct { SummarizedObject *summary.SummarizedObject Relationships []summarycache.Relationship }
func (*FakeSummaryCache) SummaryAndRelationship ¶
func (f *FakeSummaryCache) SummaryAndRelationship(runtime.Object) (*summary.SummarizedObject, []summarycache.Relationship)
type SummaryCache ¶
type SummaryCache interface {
SummaryAndRelationship(runtime.Object) (*wranglerSummary.SummarizedObject, []summarycache.Relationship)
}
SummaryCache provides an interface to get a summary/relationships for an object. Implemented by the summaryCache struct from pkg/summarycache