code: func NewEndpointsConfig(endpointsInformer coreinformers.EndpointsInformer, resyncPeriod time.Duration) *EndpointsConfig {
  	result := &EndpointsConfig{
  		lister:       endpointsInformer.Lister(),
  		listerSynced: endpointsInformer.Informer().HasSynced,
  	}
  
  	endpointsInformer.Informer().AddEventHandlerWithResyncPeriod(
  		cache.ResourceEventHandlerFuncs{
  			AddFunc:    result.handleAddEndpoints,
  			UpdateFunc: result.handleUpdateEndpoints,
  			DeleteFunc: result.handleDeleteEndpoints,
  		},
  		resyncPeriod,
  	)
  
  	return result
  }
docs: // NewEndpointsConfig creates a new EndpointsConfig.