code: func (v *vserver) run() {
  	statsTicker := time.NewTicker(v.engine.config.StatsInterval)
  	for {
  		select {
  		case <-v.quit:
  			// Shutdown active vservers, services and destinations.
  			// There is no race between this and new healthcheck
  			// notifications, since they are also handled via the
  			// same vserver go routine.
  			v.downAll()
  			statsTicker.Stop()
  			v.engine.hcManager.vcc <- vserverChecks{vserverName: v.config.Name}
  			v.unconfigureVIPs()
  
  			// Return any firewall marks that were allocated to
  			// this vserver.
  			for _, fwm := range v.fwm {
  				v.engine.fwmAlloc.put(fwm)
  			}
  
  			v.stopped <- true
  			return
  
  		case o := <-v.overrideChan:
  			v.handleOverride(o)
  			v.engine.hcManager.vcc <- v.healthchecks()
  
  		case config := <-v.update:
  			v.handleConfigUpdate(config)
  			v.engine.hcManager.vcc <- v.healthchecks()
  
  		case n := <-v.notify:
  			v.handleCheckNotification(n)
  
  		case <-statsTicker.C:
  			v.updateStats()
  		}
  
  		// Something changed - export a new vserver snapshot.
  		// The goroutine that drains v.engine.vserverChan also does a blocking write
  		// to each vserver's vserver.notify channel, which is drained by each
  		// vserver's goroutine (i.e., this one). So we need a timeout to avoid a
  		// deadlock.
  		timeout := time.After(1 * time.Second)
  		select {
  		case v.engine.vserverChan <- v.snapshot():
  		case <-timeout:
  			log.Warningf("%v: failed to send snapshot", v)
  		}
  	}
  }
docs: // run invokes a vserver. This is a long-lived Go routine that lasts for the
  // duration of the vserver, reacting to configuration changes and healthcheck
  // notifications.