From 1aaf6e6ffb015cd5a21d9d938ad84c18723973c5 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Sat, 26 Dec 2020 13:13:59 +0300 Subject: Reorganize events --- pkg/pool/static_pool.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pkg/pool') diff --git a/pkg/pool/static_pool.go b/pkg/pool/static_pool.go index 23bb2d5f..808e7d35 100755 --- a/pkg/pool/static_pool.go +++ b/pkg/pool/static_pool.go @@ -40,7 +40,7 @@ type StaticPool struct { events events.Handler // saved list of event listeners - listeners []events.EventListener + listeners []events.Listener // manages worker states and TTLs ww worker.Watcher @@ -104,7 +104,7 @@ func Initialize(ctx context.Context, cmd Command, factory worker.Factory, cfg Co return p, nil } -func AddListeners(listeners ...events.EventListener) Options { +func AddListeners(listeners ...events.Listener) Options { return func(p *StaticPool) { p.listeners = listeners for i := 0; i < len(listeners); i++ { @@ -114,7 +114,7 @@ func AddListeners(listeners ...events.EventListener) Options { } // AddListener connects event listener to the pool. -func (sp *StaticPool) addListener(listener events.EventListener) { +func (sp *StaticPool) addListener(listener events.Listener) { sp.events.AddListener(listener) } -- cgit v1.2.3