diff options
author | Valery Piashchynski <[email protected]> | 2020-12-26 13:13:59 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-12-26 13:13:59 +0300 |
commit | 1aaf6e6ffb015cd5a21d9d938ad84c18723973c5 (patch) | |
tree | 7221427ba25f8f99a10720778a420703dc2bff92 /pkg/pool/static_pool.go | |
parent | de4d0b6e66ceda08b0daec18a218c1baa71ebf04 (diff) |
Reorganize eventsv2.0.0-beta4
Diffstat (limited to 'pkg/pool/static_pool.go')
-rwxr-xr-x | pkg/pool/static_pool.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) } |