@@ -19,25 +19,26 @@ import (
19
19
)
20
20
21
21
type componentWithStability struct {
22
- Name component.Type
23
- Module string
24
- Stability map [string ]string
22
+ Name component.Type `yaml:"name"`
23
+ Module string `yaml:"module"`
24
+ Stability map [string ]string `yaml:"stability"`
25
25
}
26
26
27
27
type componentWithoutStability struct {
28
- Scheme string
29
- Module string
28
+ Name string `yaml:"name,omitempty"`
29
+ Scheme string `yaml:"scheme,omitempty"`
30
+ Module string `yaml:"module"`
30
31
}
31
32
32
33
type componentsOutput struct {
33
- BuildInfo component.BuildInfo
34
- Receivers []componentWithStability
35
- Processors []componentWithStability
36
- Exporters []componentWithStability
37
- Connectors []componentWithStability
38
- Extensions []componentWithStability
39
- Providers []componentWithoutStability
40
- Converters []componentWithoutStability
34
+ BuildInfo component.BuildInfo `yaml:"build_info"`
35
+ Receivers []componentWithStability `yaml:"receivers"`
36
+ Processors []componentWithStability `yaml:"processors"`
37
+ Exporters []componentWithStability `yaml:"exporters"`
38
+ Connectors []componentWithStability `yaml:"connectors"`
39
+ Extensions []componentWithStability `yaml:"extensions"`
40
+ Providers []componentWithoutStability `yaml:"providers"`
41
+ Converters []componentWithoutStability `yaml:"converters,omitempty"`
41
42
}
42
43
43
44
// newComponentsCommand constructs a new components command using the given CollectorSettings.
@@ -119,14 +120,14 @@ func newComponentsCommand(set CollectorSettings) *cobra.Command {
119
120
120
121
for providerScheme , providerModuleModule := range set .ProviderModules {
121
122
components .Providers = append (components .Providers , componentWithoutStability {
122
- Scheme : providerScheme . String () ,
123
+ Scheme : providerScheme ,
123
124
Module : providerModuleModule ,
124
125
})
125
126
}
126
127
127
- for converterType , converterModule := range set .ConverterModules {
128
+ for converterName , converterModule := range set .ConverterModules {
128
129
components .Converters = append (components .Converters , componentWithoutStability {
129
- Scheme : converterType . String () ,
130
+ Name : converterName ,
130
131
Module : converterModule ,
131
132
})
132
133
}
0 commit comments