code: func (s *Serf) shouldProcessQuery(filters [][]byte) bool {
  	for _, filter := range filters {
  		switch filterType(filter[0]) {
  		case filterNodeType:
  			// Decode the filter
  			var nodes filterNode
  			if err := decodeMessage(filter[1:], &nodes); err != nil {
  				s.logger.Printf("[WARN] serf: failed to decode filterNodeType: %v", err)
  				return false
  			}
  
  			// Check if we are being targeted
  			found := false
  			for _, n := range nodes {
  				if n == s.config.NodeName {
  					found = true
  					break
  				}
  			}
  			if !found {
  				return false
  			}
  
  		case filterTagType:
  			// Decode the filter
  			var filt filterTag
  			if err := decodeMessage(filter[1:], &filt); err != nil {
  				s.logger.Printf("[WARN] serf: failed to decode filterTagType: %v", err)
  				return false
  			}
  
  			// Check if we match this regex
  			tags := s.config.Tags
  			matched, err := regexp.MatchString(filt.Expr, tags[filt.Tag])
  			if err != nil {
  				s.logger.Printf("[WARN] serf: failed to compile filter regex (%s): %v", filt.Expr, err)
  				return false
  			}
  			if !matched {
  				return false
  			}
  
  		default:
  			s.logger.Printf("[WARN] serf: query has unrecognized filter type: %d", filter[0])
  			return false
  		}
  	}
  	return true
  }
docs: // shouldProcessQuery checks if a query should be proceeded given
  // a set of filers.