watchtower: add PreEvaluateFilterFn callback

In this commit, a PreEvaluateFilterFn option is added to the
wtdb.ClientSessionListCfg and it is used instead of a separate
ClientSessionFilterFn parameter. This neatens quiet a few function
signatures.
This commit is contained in:
Elle Mouton committed 2023-03-20 20:14:01 +02:00
1 parent c4c1f1ac92
commit 7bc86ca42e
6 files changed
+61 -57

No files matched your search

+1 -2
View File
@@ -60,8 +60,7 @@ type DB interface {
// ListClientSessions returns the set of all client sessions known to
// the db. An optional tower ID can be used to filter out any client
// sessions in the response that do not correspond to this tower.
ListClientSessions(*wtdb.TowerID, wtdb.ClientSessionFilterFn,
...wtdb.ClientSessionListOption) (
ListClientSessions(*wtdb.TowerID, ...wtdb.ClientSessionListOption) (
map[wtdb.SessionID]*wtdb.ClientSession, error)
// GetClientSession loads the ClientSession with the given ID from the