summaryrefslogtreecommitdiff
path: root/ipc/interface.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2022-01-12 00:28:16 +0300
committerGitHub <[email protected]>2022-01-12 00:28:16 +0300
commita191eac78092dda89dbcd19c7a3a171f6aafb71a (patch)
tree48db67c0329dc33f63bd9784fbcf50a410434ebe /ipc/interface.go
parente4ee005938a388de4e4bbb9fad097b563989e158 (diff)
parent657e5969414419180af49e1440e91c0f271985da (diff)
[#888]: bug(logger): the RR logger wasn't passed from the poolv2.7.0-rc.2
Diffstat (limited to 'ipc/interface.go')
-rw-r--r--ipc/interface.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/ipc/interface.go b/ipc/interface.go
new file mode 100644
index 00000000..1d70cd21
--- /dev/null
+++ b/ipc/interface.go
@@ -0,0 +1,20 @@
+package ipc
+
+import (
+ "context"
+ "os/exec"
+
+ "github.com/spiral/roadrunner/v2/worker"
+)
+
+// Factory is responsible for wrapping given command into tasks WorkerProcess.
+type Factory interface {
+ // SpawnWorkerWithTimeout creates new WorkerProcess process based on given command with context.
+ // Process must not be started.
+ SpawnWorkerWithTimeout(context.Context, *exec.Cmd) (*worker.Process, error)
+ // SpawnWorker creates new WorkerProcess process based on given command.
+ // Process must not be started.
+ SpawnWorker(*exec.Cmd) (*worker.Process, error)
+ // Close the factory and underlying connections.
+ Close() error
+}