func()

in server/pubsub/struct.go [105:122]


func (t *Topic) Match(event *KVChangeEvent) bool {
	match := false
	if t.MatchType == common.PatternExact {
		if !util.IsEquivalentLabel(t.Labels, event.Labels) {
			return false
		}
	}
	if len(t.Labels) == 0 {
		return true
	}
	for k, v := range t.Labels {
		if event.Labels[k] != v {
			return false
		}
		match = true
	}
	return match
}