code: func (s *StateSyncer) syncChangesEventFn() event {
  	select {
  	// trigger a full sync immediately
  	// this is usually called when a consul server was added to the cluster.
  	// stagger the delay to avoid a thundering herd.
  	case <-s.SyncFull.Notif():
  		select {
  		case <-time.After(s.stagger(s.serverUpInterval)):
  			return syncFullNotifEvent
  		case <-s.ShutdownCh:
  			return shutdownEvent
  		}
  
  	// time for a full sync again
  	case <-time.After(s.Interval + s.stagger(s.Interval)):
  		return syncFullTimerEvent
  
  	// do partial syncs on demand
  	case <-s.SyncChanges.Notif():
  		return syncChangesNotifEvent
  
  	case <-s.ShutdownCh:
  		return shutdownEvent
  	}
  }
docs: // syncChangesEventFn waits for a event which either triggers a full
  // or a partial sync or a termination signal. This function should not
  // be called directly but through s.syncChangesEvent to allow mocking
  // for testing.