@@ -23,7 +23,7 @@ import (
23
23
24
24
"go.opentelemetry.io/collector/component"
25
25
"go.opentelemetry.io/collector/config"
26
- "go.opentelemetry.io/collector/config/configparser "
26
+ "go.opentelemetry.io/collector/config/configmap "
27
27
)
28
28
29
29
// These are errors that can be returned by Unmarshal(). Note that error codes are not part
@@ -111,7 +111,7 @@ func NewDefault() ConfigUnmarshaler {
111
111
112
112
// Unmarshal the Config from a Parser.
113
113
// After the config is unmarshaled, `Validate()` must be called to validate.
114
- func (* defaultUnmarshaler ) Unmarshal (v * configparser .ConfigMap , factories component.Factories ) (* config.Config , error ) {
114
+ func (* defaultUnmarshaler ) Unmarshal (v * configmap .ConfigMap , factories component.Factories ) (* config.Config , error ) {
115
115
var cfg config.Config
116
116
117
117
// Unmarshal the config.
@@ -209,7 +209,7 @@ func unmarshalExtensions(exts map[string]map[string]interface{}, factories map[c
209
209
210
210
// Iterate over extensions and create a config for each.
211
211
for key , value := range exts {
212
- componentConfig := configparser .NewConfigMapFromStringMap (value )
212
+ componentConfig := configmap .NewConfigMapFromStringMap (value )
213
213
expandEnvConfig (componentConfig )
214
214
215
215
// Decode the key into type and fullName components.
@@ -280,7 +280,7 @@ func unmarshalService(rawService serviceSettings) (config.Service, error) {
280
280
}
281
281
282
282
// LoadReceiver loads a receiver config from componentConfig using the provided factories.
283
- func LoadReceiver (componentConfig * configparser .ConfigMap , id config.ComponentID , factory component.ReceiverFactory ) (config.Receiver , error ) {
283
+ func LoadReceiver (componentConfig * configmap .ConfigMap , id config.ComponentID , factory component.ReceiverFactory ) (config.Receiver , error ) {
284
284
// Create the default config for this receiver.
285
285
receiverCfg := factory .CreateDefaultConfig ()
286
286
receiverCfg .SetIDName (id .Name ())
@@ -301,7 +301,7 @@ func unmarshalReceivers(recvs map[string]map[string]interface{}, factories map[c
301
301
302
302
// Iterate over input map and create a config for each.
303
303
for key , value := range recvs {
304
- componentConfig := configparser .NewConfigMapFromStringMap (value )
304
+ componentConfig := configmap .NewConfigMapFromStringMap (value )
305
305
expandEnvConfig (componentConfig )
306
306
307
307
// Decode the key into type and fullName components.
@@ -338,7 +338,7 @@ func unmarshalExporters(exps map[string]map[string]interface{}, factories map[co
338
338
339
339
// Iterate over Exporters and create a config for each.
340
340
for key , value := range exps {
341
- componentConfig := configparser .NewConfigMapFromStringMap (value )
341
+ componentConfig := configmap .NewConfigMapFromStringMap (value )
342
342
expandEnvConfig (componentConfig )
343
343
344
344
// Decode the key into type and fullName components.
@@ -380,7 +380,7 @@ func unmarshalProcessors(procs map[string]map[string]interface{}, factories map[
380
380
381
381
// Iterate over processors and create a config for each.
382
382
for key , value := range procs {
383
- componentConfig := configparser .NewConfigMapFromStringMap (value )
383
+ componentConfig := configmap .NewConfigMapFromStringMap (value )
384
384
expandEnvConfig (componentConfig )
385
385
386
386
// Decode the key into type and fullName components.
@@ -475,9 +475,9 @@ func parseIDNames(pipelineID config.ComponentID, componentType string, names []s
475
475
return ret , nil
476
476
}
477
477
478
- // expandEnvConfig updates a configparser .ConfigMap with expanded values for all the values (simple, list or map value).
478
+ // expandEnvConfig updates a configmap .ConfigMap with expanded values for all the values (simple, list or map value).
479
479
// It does not expand the keys.
480
- func expandEnvConfig (v * configparser .ConfigMap ) {
480
+ func expandEnvConfig (v * configmap .ConfigMap ) {
481
481
for _ , k := range v .AllKeys () {
482
482
v .Set (k , expandStringValues (v .Get (k )))
483
483
}
@@ -568,7 +568,7 @@ func expandEnv(s string) string {
568
568
})
569
569
}
570
570
571
- func unmarshal (componentSection * configparser .ConfigMap , intoCfg interface {}) error {
571
+ func unmarshal (componentSection * configmap .ConfigMap , intoCfg interface {}) error {
572
572
if cu , ok := intoCfg .(config.Unmarshallable ); ok {
573
573
return cu .Unmarshal (componentSection )
574
574
}
0 commit comments