summaryrefslogtreecommitdiff
path: root/interfaces/app/interface.go
blob: 4db7a09428b117e1f59c84a117bb66071d0d3a2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
}