summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/server/interface.go3
-rw-r--r--plugins/server/plugin.go5
-rw-r--r--tests/plugins/server/plugin_pipes.go5
3 files changed, 5 insertions, 8 deletions
diff --git a/plugins/server/interface.go b/plugins/server/interface.go
index fe04b85b..22f02685 100644
--- a/plugins/server/interface.go
+++ b/plugins/server/interface.go
@@ -6,7 +6,6 @@ import (
"github.com/spiral/roadrunner/v2/pkg/events"
"github.com/spiral/roadrunner/v2/pkg/pool"
- poolImpl "github.com/spiral/roadrunner/v2/pkg/pool"
"github.com/spiral/roadrunner/v2/pkg/worker"
)
@@ -17,5 +16,5 @@ type Env map[string]string
type Server interface {
CmdFactory(env Env) (func() *exec.Cmd, error)
NewWorker(ctx context.Context, env Env, listeners ...events.Listener) (*worker.Process, error)
- NewWorkerPool(ctx context.Context, opt poolImpl.Config, env Env, listeners ...events.Listener) (pool.Pool, error)
+ NewWorkerPool(ctx context.Context, opt pool.Config, env Env, listeners ...events.Listener) (pool.Pool, error)
}
diff --git a/plugins/server/plugin.go b/plugins/server/plugin.go
index 16123786..9cdb8401 100644
--- a/plugins/server/plugin.go
+++ b/plugins/server/plugin.go
@@ -15,7 +15,6 @@ import (
// core imports
"github.com/spiral/roadrunner/v2/pkg/events"
"github.com/spiral/roadrunner/v2/pkg/pool"
- poolImpl "github.com/spiral/roadrunner/v2/pkg/pool"
"github.com/spiral/roadrunner/v2/pkg/transport/pipe"
"github.com/spiral/roadrunner/v2/pkg/transport/socket"
"github.com/spiral/roadrunner/v2/pkg/worker"
@@ -136,7 +135,7 @@ 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.Listener) (pool.Pool, error) {
+func (server *Plugin) NewWorkerPool(ctx context.Context, opt pool.Config, env Env, listeners ...events.Listener) (pool.Pool, error) {
const op = errors.Op("server_plugin_new_worker_pool")
spawnCmd, err := server.CmdFactory(env)
if err != nil {
@@ -149,7 +148,7 @@ func (server *Plugin) NewWorkerPool(ctx context.Context, opt poolImpl.Config, en
list = append(list, listeners...)
}
- p, err := poolImpl.Initialize(ctx, spawnCmd, server.factory, opt, poolImpl.AddListeners(list...))
+ p, err := pool.Initialize(ctx, spawnCmd, server.factory, opt, pool.AddListeners(list...))
if err != nil {
return nil, errors.E(op, err)
}
diff --git a/tests/plugins/server/plugin_pipes.go b/tests/plugins/server/plugin_pipes.go
index f53b228f..5b2cdd96 100644
--- a/tests/plugins/server/plugin_pipes.go
+++ b/tests/plugins/server/plugin_pipes.go
@@ -7,7 +7,6 @@ import (
"github.com/spiral/errors"
"github.com/spiral/roadrunner/v2/pkg/payload"
"github.com/spiral/roadrunner/v2/pkg/pool"
- poolImpl "github.com/spiral/roadrunner/v2/pkg/pool"
"github.com/spiral/roadrunner/v2/pkg/worker"
"github.com/spiral/roadrunner/v2/plugins/config"
"github.com/spiral/roadrunner/v2/plugins/server"
@@ -16,12 +15,12 @@ import (
const ConfigSection = "server"
const Response = "test"
-var testPoolConfig = poolImpl.Config{
+var testPoolConfig = pool.Config{
NumWorkers: 10,
MaxJobs: 100,
AllocateTimeout: time.Second * 10,
DestroyTimeout: time.Second * 10,
- Supervisor: &poolImpl.SupervisorConfig{
+ Supervisor: &pool.SupervisorConfig{
WatchTick: 60,
TTL: 1000,
IdleTTL: 10,