summaryrefslogtreecommitdiff
path: root/service/env/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'service/env/config.go')
-rw-r--r--service/env/config.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/service/env/config.go b/service/env/config.go
new file mode 100644
index 00000000..06342f98
--- /dev/null
+++ b/service/env/config.go
@@ -0,0 +1,17 @@
+package env
+
+import (
+ "github.com/spiral/roadrunner/service"
+)
+
+// Config defines set of env values for RR workers.
+type Config struct {
+ // Values to set as worker _ENV.
+ Values map[string]string
+}
+
+// Hydrate must populate Config values using given Config source. Must return error if Config is not valid.
+func (c *Config) Hydrate(cfg service.Config) error {
+ c.Values = map[string]string{"RR": "YES"}
+ return cfg.Unmarshal(&c.Values)
+}