Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
func Apply(obj unstructured.Unstructured, filters ...Filter) bool
Apply applies all the provided filters to a given object. Then returns if the object is filtered out or not. Returns true if this object is kept, otherwise false.
func ApplyToList ¶
func ApplyToList(list unstructured.UnstructuredList, filters ...Filter) unstructured.UnstructuredList
ApplyToList applies all the provided filters to a UnstructuredList. It only keeps items that pass all the filters.
Types ¶
type Filter ¶
type Filter func(unstructured.Unstructured) bool
Filter is used to filter Unstructured objects. It is basically a func(unstructured.Unstructured) bool.
func ByAppliedWorkload ¶
ByAppliedWorkload returns a filter that only keeps trait definitions that applies to the given workload. Empty workload name will keep everything.
func ByOwnerAddon ¶
ByOwnerAddon returns a filter that filters out what does not belong to the owner addon. Empty addon name will keep everything.