summaryrefslogtreecommitdiff
path: root/boruta.go
diff options
context:
space:
mode:
authorMaciej Wereski <m.wereski@partner.samsung.com>2017-09-20 16:55:47 +0200
committerMaciej Wereski <m.wereski@partner.samsung.com>2017-10-05 12:39:09 +0200
commit4176e6075ca14420ba2e6f1dc966e5cb7e24dd95 (patch)
tree35e60a3bbf126827be068835cfbe32fd450e2b4a /boruta.go
parente44304bcd485197c51246fbc73737d6fa0afb328 (diff)
downloadboruta-4176e6075ca14420ba2e6f1dc966e5cb7e24dd95.tar.gz
boruta-4176e6075ca14420ba2e6f1dc966e5cb7e24dd95.tar.bz2
boruta-4176e6075ca14420ba2e6f1dc966e5cb7e24dd95.zip
Make ListFilter an interface
Currently ListFilter is defined as a structure. We don't know how such structure should look like. Moreover it will be probably changed to match new uses. We're not interested in the data provided, but what functionality it provides. Thus change it to simple interface. Change-Id: Ib297345d2f188fc941cf04794f03ec5250501474 Signed-off-by: Maciej Wereski <m.wereski@partner.samsung.com> Reviewed-on: https://mcdsrvbld02.digital.local/review/49471
Diffstat (limited to 'boruta.go')
-rw-r--r--boruta.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/boruta.go b/boruta.go
index 726c9bc..4e48581 100644
--- a/boruta.go
+++ b/boruta.go
@@ -119,7 +119,10 @@ type WorkerInfo struct {
}
// ListFilter is used to filter Requests in the Queue.
-type ListFilter struct{}
+type ListFilter interface {
+ // Match tells if request matches the filter.
+ Match(req *ReqInfo) bool
+}
// Requests defines an interaction of a user with Requests Queue.
type Requests interface {