code: func handleMemberEvent(logger *log.Logger, fn routerFn, areaID types.AreaID, e serf.Event) {
  	me, ok := e.(serf.MemberEvent)
  	if !ok {
  		logger.Printf("[ERR] consul: Bad event type %#v", e)
  		return
  	}
  
  	for _, m := range me.Members {
  		ok, parts := metadata.IsConsulServer(m)
  		if !ok {
  			logger.Printf("[WARN]: consul: Non-server %q in server-only area %q",
  				m.Name, areaID)
  			continue
  		}
  
  		if err := fn(areaID, parts); err != nil {
  			logger.Printf("[ERR] consul: Failed to process %s event for server %q in area %q: %v",
  				me.Type.String(), m.Name, areaID, err)
  			continue
  		}
  
  		logger.Printf("[INFO] consul: Handled %s event for server %q in area %q",
  			me.Type.String(), m.Name, areaID)
  	}
  }
docs: // handleMemberEvents attempts to apply the given Serf member event to the given
  // router function.