code: func HandleSerfEvents(logger *log.Logger, router *Router, areaID types.AreaID, shutdownCh <-chan struct{}, eventCh <-chan serf.Event) {
  	for {
  		select {
  		case <-shutdownCh:
  			return
  
  		case e := <-eventCh:
  			switch e.EventType() {
  			case serf.EventMemberJoin:
  				handleMemberEvent(logger, router.AddServer, areaID, e)
  
  			case serf.EventMemberLeave, serf.EventMemberReap:
  				handleMemberEvent(logger, router.RemoveServer, areaID, e)
  
  			case serf.EventMemberFailed:
  				handleMemberEvent(logger, router.FailServer, areaID, e)
  
  			// All of these event types are ignored.
  			case serf.EventMemberUpdate:
  			case serf.EventUser:
  			case serf.EventQuery:
  
  			default:
  				logger.Printf("[WARN] consul: Unhandled Serf Event: %#v", e)
  			}
  		}
  	}
  }
docs: // HandleSerfEvents is a long-running goroutine that pushes incoming events from
  // a Serf manager's channel into the given router. This will return when the
  // shutdown channel is closed.