summaryrefslogtreecommitdiff
path: root/interfaces
diff options
context:
space:
mode:
Diffstat (limited to 'interfaces')
-rw-r--r--interfaces/pool/pool.go6
-rw-r--r--interfaces/worker/worker.go11
2 files changed, 9 insertions, 8 deletions
diff --git a/interfaces/pool/pool.go b/interfaces/pool/pool.go
index a1015fd6..72da9597 100644
--- a/interfaces/pool/pool.go
+++ b/interfaces/pool/pool.go
@@ -7,7 +7,7 @@ import (
"github.com/spiral/roadrunner/v2/interfaces/events"
"github.com/spiral/roadrunner/v2/interfaces/worker"
- "github.com/spiral/roadrunner/v2/internal"
+ "github.com/spiral/roadrunner/v2/pkg/payload"
)
// Pool managed set of inner worker processes.
@@ -19,9 +19,9 @@ type Pool interface {
GetConfig() interface{}
// Exec
- Exec(rqs internal.Payload) (internal.Payload, error)
+ Exec(rqs payload.Payload) (payload.Payload, error)
- ExecWithContext(ctx context.Context, rqs internal.Payload) (internal.Payload, error)
+ ExecWithContext(ctx context.Context, rqs payload.Payload) (payload.Payload, error)
// Workers returns worker list associated with the pool.
Workers() (workers []worker.BaseProcess)
diff --git a/interfaces/worker/worker.go b/interfaces/worker/worker.go
index edbc68d9..f830fdf2 100644
--- a/interfaces/worker/worker.go
+++ b/interfaces/worker/worker.go
@@ -5,9 +5,10 @@ import (
"fmt"
"time"
- "github.com/spiral/goridge/v3"
+ "github.com/spiral/goridge/v3/interfaces/relay"
"github.com/spiral/roadrunner/v2/interfaces/events"
"github.com/spiral/roadrunner/v2/internal"
+ "github.com/spiral/roadrunner/v2/pkg/payload"
)
// Allocator is responsible for worker allocation in the pool
@@ -46,17 +47,17 @@ type BaseProcess interface {
Kill() error
// Relay returns attached to worker goridge relay
- Relay() goridge.Relay
+ Relay() relay.Relay
// AttachRelay used to attach goridge relay to the worker process
- AttachRelay(rl goridge.Relay)
+ AttachRelay(rl relay.Relay)
}
type SyncWorker interface {
// BaseProcess provides basic functionality for the SyncWorker
BaseProcess
// Exec used to execute payload on the SyncWorker, there is no TIMEOUTS
- Exec(rqs internal.Payload) (internal.Payload, error)
+ Exec(rqs payload.Payload) (payload.Payload, error)
// ExecWithContext used to handle Exec with TTL
- ExecWithContext(ctx context.Context, p internal.Payload) (internal.Payload, error)
+ ExecWithContext(ctx context.Context, p payload.Payload) (payload.Payload, error)
}