prow/cmd/pipeline/controller.go
func (c *controller) enqueueKey(ctx string, obj interface{}) {
	switch o := obj.(type) {
	case *prowjobv1.ProwJob:
		ns := o.Spec.Namespace
		if ns == "" {
			ns = o.Namespace
		}
		c.workqueue.AddRateLimited(toKey(ctx, ns, o.Name))
	case *pipelinev1alpha1.PipelineRun:
		c.workqueue.AddRateLimited(toKey(ctx, o.Namespace, o.Name))
	default:
		logrus.Warnf("cannot enqueue unknown type %T: %v", o, obj)
		return
	}
}
func (c *controller) enqueueKey(ctx string, obj interface{}) {
	switch o := obj.(type) {
	case *prowjobv1.ProwJob:
		ns := o.Spec.Namespace
		if ns == "" {
			ns = o.Namespace
		}
		c.workqueue.AddRateLimited(toKey(ctx, ns, o.Name))
	case *pipelinev1alpha1.PipelineRun:
		c.workqueue.AddRateLimited(toKey(ctx, o.Namespace, o.Name))
	default:
		logrus.Warnf("cannot enqueue unknown type %T: %v", o, obj)
		return
	}
}
func ( c * controller ) enqueueKey ( ctx string , obj interface { } ) { switch o := obj . ( type ) { case * prowjobv1 . ProwJob : ns := o . Spec . Namespace if ns == " " { ns = o . Namespace } c . workqueue . AddRateLimited ( toKey ( ctx , ns , o . Name ) ) case * pipelinev1alpha1 . PipelineRun : c . workqueue . AddRateLimited ( toKey ( ctx , o . Namespace , o . Name ) ) default : logrus . Warnf ( " " , o , obj ) return } }
// enqueueKey schedules an item for reconciliation
enqueueKey schedules an item for reconciliation