summaryrefslogtreecommitdiff
path: root/interfaces/server/interface.go
blob: 2dae30c5ea5b9e0160efcfa51d99ead4ea876920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package server

import (
	"context"
	"os/exec"

	"github.com/spiral/roadrunner/v2"
)

type Env map[string]string

// Server creates workers for the application.
type Server 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)
}