summaryrefslogtreecommitdiff
path: root/plugins/server/plugin.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-26 13:13:59 +0300
committerValery Piashchynski <[email protected]>2020-12-26 13:13:59 +0300
commit1aaf6e6ffb015cd5a21d9d938ad84c18723973c5 (patch)
tree7221427ba25f8f99a10720778a420703dc2bff92 /plugins/server/plugin.go
parentde4d0b6e66ceda08b0daec18a218c1baa71ebf04 (diff)
Reorganize eventsv2.0.0-beta4
Diffstat (limited to 'plugins/server/plugin.go')
-rw-r--r--plugins/server/plugin.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index b280d253..5b023bc6 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -104,10 +104,10 @@ func (server *Plugin) CmdFactory(env Env) (func() *exec.Cmd, error) {
}
// NewWorker issues new standalone worker.
-func (server *Plugin) NewWorker(ctx context.Context, env Env, listeners ...events.EventListener) (worker.BaseProcess, error) {
+func (server *Plugin) NewWorker(ctx context.Context, env Env, listeners ...events.Listener) (worker.BaseProcess, error) {
const op = errors.Op("new worker")
- list := make([]events.EventListener, 0, len(listeners))
+ list := make([]events.Listener, 0, len(listeners))
list = append(list, server.collectWorkerLogs)
spawnCmd, err := server.CmdFactory(env)
@@ -124,14 +124,14 @@ func (server *Plugin) NewWorker(ctx context.Context, env Env, listeners ...event
}
// NewWorkerPool issues new worker pool.
-func (server *Plugin) NewWorkerPool(ctx context.Context, opt poolImpl.Config, env Env, listeners ...events.EventListener) (pool.Pool, error) {
+func (server *Plugin) NewWorkerPool(ctx context.Context, opt poolImpl.Config, env Env, listeners ...events.Listener) (pool.Pool, error) {
const op = errors.Op("server plugins new worker pool")
spawnCmd, err := server.CmdFactory(env)
if err != nil {
return nil, errors.E(op, err)
}
- list := make([]events.EventListener, 0, len(listeners))
+ list := make([]events.Listener, 0, len(listeners))
list = append(list, server.collectPoolLogs)
p, err := poolImpl.Initialize(ctx, spawnCmd, server.factory, opt, poolImpl.AddListeners(list...))