diff options
author | Valery Piashchynski <[email protected]> | 2020-11-16 15:11:27 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2020-11-16 15:11:27 +0300 |
commit | d40ff179e43a02726bfa4298e523a16c79a88cea (patch) | |
tree | 2677952acd0a396f1950b2e85cae62e8b9818d7a /interfaces | |
parent | a7ba4df83b4f2c67a3a0fb9d1dd35663935c90be (diff) |
Rename app->server
Rename Config -> PoolConfig
Diffstat (limited to 'interfaces')
-rw-r--r-- | interfaces/server/interface.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/interfaces/server/interface.go b/interfaces/server/interface.go new file mode 100644 index 00000000..51d172cb --- /dev/null +++ b/interfaces/server/interface.go @@ -0,0 +1,17 @@ +package server + +import ( + "context" + "os/exec" + + "github.com/spiral/roadrunner/v2" +) + +type Env map[string]string + +// WorkerFactory creates workers for the application. +type WorkerFactory interface { + CmdFactory(env Env) (func() *exec.Cmd, error) + NewWorker(ctx context.Context, env Env) (roadrunner.WorkerBase, error) + NewWorkerPool(ctx context.Context, opt roadrunner.PoolConfig, env Env) (roadrunner.Pool, error) +} |