Documentation ¶
Index ¶
- Constants
- func ForEach(do func(node *yaml.RNode) error) yaml.Filter
- func GVK(object *yaml.RNode) string
- func ItemToResult(item *yaml.RNode, sev framework.Severity, msg string) *framework.Result
- func LookupPod(object *yaml.RNode) (*yaml.RNode, error)
- func MustGetPath(item *yaml.RNode) string
- func ResourceID(object *yaml.RNode) string
- func ReverseTee(filters ...yaml.Filter) yaml.Filter
- func Ternary[T any](cond bool, yes T, no T) T
- type CSV
- type LogFunc
- type ReverseTeePiper
Constants ¶
const (
KindPod = "Pod"
)
Variables ¶
This section is empty.
Functions ¶
func ForEach ¶
forEach returns a filter that calls visitElements with the "do" function on the input sequence node
func ItemToResult ¶
func LookupPod ¶
get the pod from the input node. If the node is of kind pod, the node itself is returned. Otherwise, the pod template from a list of conventional path is looked up.
func MustGetPath ¶
func ResourceID ¶
func ReverseTee ¶
ReverseTee is like tee in that it passes the arguments instead the output, but it will only pass the arguments, if the filter pipe returns nil. this can be useful when searching for the right place to perform an operation and then cancel early without running subsequent pipes
Types ¶
type CSV ¶
type CSV []string
CSV can be used to use a string slice as data while reading it from the function config data as comma separated string. This is useful when using simple configmaps as function config as those don't support anything other than a string map
func (*CSV) UnmarshalJSON ¶
type LogFunc ¶
func MakeLogFunc ¶
func MakeLogFunc(rl *framework.ResourceList, item *yaml.RNode) LogFunc