Exemplo n.º 1
0
func (e *Store) createFilter(m *generic.SelectionPredicate) storage.Filter {
	filterFunc := func(obj runtime.Object) bool {
		matches, err := m.Matches(obj)
		if err != nil {
			glog.Errorf("unable to match watch: %v", err)
			return false
		}
		return matches
	}
	return storage.NewSimpleFilter(filterFunc, m.MatcherIndex)
}