summaryrefslogtreecommitdiff
path: root/plugins/http/config.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-11-16 14:21:35 +0300
committerValery Piashchynski <[email protected]>2020-11-16 14:21:35 +0300
commit57ad958acab2d108be0a35547faf6e7a791cf069 (patch)
tree3c519708540265a7e74b03d1fe17ef4101ffcfdf /plugins/http/config.go
parentd890eee1742dc3a0a1c787f7e65d40b1e81a94db (diff)
Update Pool
Diffstat (limited to 'plugins/http/config.go')
-rw-r--r--plugins/http/config.go31
1 files changed, 30 insertions, 1 deletions
diff --git a/plugins/http/config.go b/plugins/http/config.go
index e91133ef..b3d16b62 100644
--- a/plugins/http/config.go
+++ b/plugins/http/config.go
@@ -6,8 +6,37 @@ import (
"net"
"os"
"strings"
+ "time"
+
+ "github.com/spiral/roadrunner/v2"
)
+type PoolConfig struct {
+}
+
+type ServerConfig struct {
+ // Command includes command strings with all the parameters, example: "php worker.php pipes".
+ Command string
+
+ // User under which process will be started
+ User string
+
+ // Relay defines connection method and factory to be used to connect to workers:
+ // "pipes", "tcp://:6001", "unix://rr.sock"
+ // This config section must not change on re-configuration.
+ Relay string
+
+ // RelayTimeout defines for how long socket factory will be waiting for worker connection. This config section
+ // must not change on re-configuration.
+ RelayTimeout time.Duration
+
+ // Pool defines worker pool configuration, number of workers, timeouts and etc. This config section might change
+ // while server is running.
+ PoolCfg *roadrunner.PoolConfig
+
+ env map[string]string
+}
+
// Config configures RoadRunner HTTP server.
type Config struct {
// Port and port to handle as http server.
@@ -33,7 +62,7 @@ type Config struct {
Uploads *UploadsConfig
// Workers configures rr server and worker pool.
- Workers *roadrunner.ServerConfig
+ Workers *ServerConfig
}
// FCGIConfig for FastCGI server.