Run runs the given config, replacing any existing config.
(cfg *Config)
| 102 | |
| 103 | // Run runs the given config, replacing any existing config. |
| 104 | func Run(cfg *Config) error { |
| 105 | cfgJSON, err := json.Marshal(cfg) |
| 106 | if err != nil { |
| 107 | return err |
| 108 | } |
| 109 | return Load(cfgJSON, true) |
| 110 | } |
| 111 | |
| 112 | // Load loads the given config JSON and runs it only |
| 113 | // if it is different from the current config or |