func NewController(
	ctx context.Context,
	cmw configmap.Watcher,
) *controller.Impl {

	runInformer := runinformer.Get(ctx)

	r := &Reconciler{}

	impl := runreconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
		return controller.Options{
			AgentName: "sample-custom-task",
		}
	})

	logging.FromContext(ctx).Info("Setting up event handlers")

	// Add event handler for Runs
	runInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
		FilterFunc: pipelinecontroller.FilterRunRef(schemeGroupVersion.String(), kind),
		Handler:    controller.HandleAll(impl.Enqueue),
	})

	return impl
}
// NewController initializes the controller and registers event handlers to enqueue events.
NewController initializes the controller and registers event handlers to enqueue events.
// NewController initializes the controller and registers event handlers to enqueue events .
func NewController(
	ctx context.Context,
	cmw configmap.Watcher,
) *controller.Impl {
	runInformer := runinformer.Get(ctx)
	r := &Reconciler{}
	impl := runreconciler.NewImpl(ctx, r, func(impl *controller.Impl) controller.Options {
		return controller.Options{
			AgentName: "sample-custom-task",
		}
	})
	logging.FromContext(ctx).Info("Setting up event handlers")
	runInformer.Informer().AddEventHandler(cache.FilteringResourceEventHandler{
		FilterFunc: pipelinecontroller.FilterRunRef(schemeGroupVersion.String(), kind),
		Handler:    controller.HandleAll(impl.Enqueue),
	})
	return impl
}
func NewController ( ctx context . Context , cmw configmap . Watcher , ) * controller . Impl { runInformer := runinformer . Get ( ctx ) r := & Reconciler { } impl := runreconciler . NewImpl ( ctx , r , func ( impl * controller . Impl ) controller . Options { return controller . Options { AgentName : " " , } } ) logging . FromContext ( ctx ) . Info ( " " ) runInformer . Informer ( ) . AddEventHandler ( cache . FilteringResourceEventHandler { FilterFunc : pipelinecontroller . FilterRunRef ( schemeGroupVersion . String ( ) , kind ) , Handler : controller . HandleAll ( impl . Enqueue ) , } ) return impl }
NewController initializes the controller and registers event handlers to enqueue events.
NewController initializes the controller and registers event handlers to enqueue events .
// Add event handler for Runs