diff options
author | Wolfy-J <[email protected]> | 2018-07-26 16:32:27 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-07-26 16:32:27 +0300 |
commit | bcef5b36bb50b2fecd4db4ca8e01640347300bea (patch) | |
tree | b6db6954063dd3288a80f24aa714e8799664d909 /service/env/config.go | |
parent | 0f8e2bab6888f1b27ed2bd1b91ac6b2677f03450 (diff) |
- added support for custom env provider
- new config section "env" to share env variables with php process
- container can resolve interfaces now
Diffstat (limited to 'service/env/config.go')
-rw-r--r-- | service/env/config.go | 17 |
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) +} |