From 4176e6075ca14420ba2e6f1dc966e5cb7e24dd95 Mon Sep 17 00:00:00 2001 From: Maciej Wereski Date: Wed, 20 Sep 2017 16:55:47 +0200 Subject: [PATCH] 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 Reviewed-on: https://mcdsrvbld02.digital.local/review/49471 --- boruta.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 { -- 2.7.4