def matches()

in atlas-lwc-events/src/main/scala/com/netflix/atlas/lwc/events/ExprUtils.scala [88:98]


  def matches(query: Query, tags: String => String): Boolean = {
    query match {
      case Query.True             => true
      case Query.False            => false
      case q: Query.HasKey        => tags(q.k) != null
      case q: Query.KeyValueQuery => check(q, tags)
      case Query.And(q1, q2)      => matches(q1, tags) && matches(q2, tags)
      case Query.Or(q1, q2)       => matches(q1, tags) || matches(q2, tags)
      case Query.Not(q)           => !matches(q, tags)
    }
  }