code: func NewCloudNodeController(
  	nodeInformer coreinformers.NodeInformer,
  	kubeClient clientset.Interface,
  	cloud cloudprovider.Interface,
  	nodeStatusUpdateFrequency time.Duration) *CloudNodeController {
  
  	eventBroadcaster := record.NewBroadcaster()
  	recorder := eventBroadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "cloud-node-controller"})
  	eventBroadcaster.StartLogging(klog.Infof)
  	if kubeClient != nil {
  		klog.V(0).Infof("Sending events to api server.")
  		eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: kubeClient.CoreV1().Events("")})
  	} else {
  		klog.V(0).Infof("No api server defined - no events will be sent to API server.")
  	}
  
  	cnc := &CloudNodeController{
  		nodeInformer:              nodeInformer,
  		kubeClient:                kubeClient,
  		recorder:                  recorder,
  		cloud:                     cloud,
  		nodeStatusUpdateFrequency: nodeStatusUpdateFrequency,
  	}
  
  	// Use shared informer to listen to add/update of nodes. Note that any nodes
  	// that exist before node controller starts will show up in the update method
  	cnc.nodeInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{
  		AddFunc:    cnc.AddCloudNode,
  		UpdateFunc: cnc.UpdateCloudNode,
  	})
  
  	return cnc
  }
docs: // NewCloudNodeController creates a CloudNodeController object