(configs []*Config)
| 11 | ) |
| 12 | |
| 13 | func GetServices(configs []*Config) (services.Services, error) { |
| 14 | allSvcs := services.Services{} |
| 15 | for _, conf := range configs { |
| 16 | svcs, err := conf.Services() |
| 17 | if err != nil { |
| 18 | fmt.Fprintf( |
| 19 | os.Stderr, |
| 20 | "error reading services in plugin \"%s\", skipping", |
| 21 | conf.Name, |
| 22 | ) |
| 23 | continue |
| 24 | } |
| 25 | for name, svc := range svcs { |
| 26 | allSvcs[name] = svc |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | return allSvcs, nil |
| 31 | } |