blob: 06342f98ae97210123b4e7041e4e42bb0dcdf1cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
}
|