func scheduleSuccessEvent(ns, podName, nodeName string) func(*v1.Event) bool { … } func scheduleFailureEvent(podName string) func(*v1.Event) bool { … } type Action … // observeEventAfterAction returns true if an event matching the predicate was emitted // from the system after performing the supplied action. func observeEventAfterAction(ctx context.Context, c clientset.Interface, ns string, eventPredicate func(*v1.Event) bool, action Action) (bool, error) { … }