From d40ff179e43a02726bfa4298e523a16c79a88cea Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 16 Nov 2020 15:11:27 +0300 Subject: Rename app->server Rename Config -> PoolConfig --- interfaces/server/interface.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 interfaces/server/interface.go (limited to 'interfaces') 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) +} -- cgit v1.2.3 From f592c6e410fd1f8075c8b75597eb8e5dc7ba9cf1 Mon Sep 17 00:00:00 2001 From: Valery Piashchynski Date: Mon, 16 Nov 2020 15:36:52 +0300 Subject: Metrics collector returns slice of values --- interfaces/metrics/interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'interfaces') diff --git a/interfaces/metrics/interface.go b/interfaces/metrics/interface.go index 8207fb51..505c3d7b 100644 --- a/interfaces/metrics/interface.go +++ b/interfaces/metrics/interface.go @@ -5,5 +5,5 @@ import ( ) type StatProvider interface { - MetricsCollector() prometheus.Collector + MetricsCollector() []prometheus.Collector } -- cgit v1.2.3