diff options
Diffstat (limited to 'interfaces/app/interface.go')
-rw-r--r-- | interfaces/app/interface.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/interfaces/app/interface.go b/interfaces/app/interface.go new file mode 100644 index 00000000..4db7a094 --- /dev/null +++ b/interfaces/app/interface.go @@ -0,0 +1,15 @@ +package app + +import ( + "context" + "os/exec" + + "github.com/spiral/roadrunner/v2" +) + +// WorkerFactory creates workers for the application. +type WorkerFactory interface { + CmdFactory(env map[string]string) (func() *exec.Cmd, error) + NewWorker(ctx context.Context, env map[string]string) (roadrunner.WorkerBase, error) + NewWorkerPool(ctx context.Context, opt roadrunner.PoolConfig, env map[string]string) (roadrunner.Pool, error) +} |