From 34689cb3f369ad71164b81d0c05238d78cb67945 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 12 Jan 2015 20:36:45 +0100 Subject: Added manual triggering of filters --- event/filter/filter.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'event') diff --git a/event/filter/filter.go b/event/filter/filter.go index 9817d5782..ca767f413 100644 --- a/event/filter/filter.go +++ b/event/filter/filter.go @@ -68,3 +68,11 @@ out: } } } + +func (self *Filters) Match(a, b Filter) bool { + return reflect.TypeOf(a) == reflect.TypeOf(b) && a.Compare(b) +} + +func (self *Filters) Get(i int) Filter { + return self.watchers[i] +} -- cgit v1.2.3