code: func newLoadBalancerController(cfg *loadBalancerConfig, kubeClient *unversioned.Client, namespace string, tcpServices map[string]int) *loadBalancerController {
  	lbc := loadBalancerController{
  		cfg:    cfg,
  		client: kubeClient,
  		queue:  workqueue.New(),
  		reloadRateLimiter: util.NewTokenBucketRateLimiter(
  			reloadQPS, int(reloadQPS)),
  		targetService:   *targetService,
  		forwardServices: *forwardServices,
  		httpPort:        *httpPort,
  		tcpServices:     tcpServices,
  	}
  
  	enqueue := func(obj interface{}) {
  		key, err := keyFunc(obj)
  		if err != nil {
  			glog.Infof("Couldn't get key for object %+v: %v", obj, err)
  			return
  		}
  		lbc.queue.Add(key)
  	}
  	eventHandlers := framework.ResourceEventHandlerFuncs{
  		AddFunc:    enqueue,
  		DeleteFunc: enqueue,
  		UpdateFunc: func(old, cur interface{}) {
  			if !reflect.DeepEqual(old, cur) {
  				enqueue(cur)
  			}
  		},
  	}
  
  	lbc.svcLister.Store, lbc.svcController = framework.NewInformer(
  		cache.NewListWatchFromClient(
  			lbc.client, "services", namespace, fields.Everything()),
  		&api.Service{}, resyncPeriod, eventHandlers)
  
  	lbc.epLister.Store, lbc.epController = framework.NewInformer(
  		cache.NewListWatchFromClient(
  			lbc.client, "endpoints", namespace, fields.Everything()),
  		&api.Endpoints{}, resyncPeriod, eventHandlers)
  
  	return &lbc
  }
docs: // newLoadBalancerController creates a new controller from the given config.