EnabledFromConfig resolves the effective plugin set for the provided configuration.
(cfg *config.Config)
| 28 | |
| 29 | // EnabledFromConfig resolves the effective plugin set for the provided configuration. |
| 30 | func EnabledFromConfig(cfg *config.Config) ([]components.Plugin, []string) { |
| 31 | desired := cfg.Plugins.Enabled |
| 32 | if desired == nil { |
| 33 | desired = defaultEnabled |
| 34 | } |
| 35 | |
| 36 | return resolve(desired) |
| 37 | } |
| 38 | |
| 39 | func resolve(ids []string) ([]components.Plugin, []string) { |
| 40 | seen := make(map[string]struct{}) |