diff --git a/config/config.go b/config/config.go index 99ac6fb383c..6019cde3ad4 100644 --- a/config/config.go +++ b/config/config.go @@ -169,9 +169,9 @@ type validatable interface { Validate() error } -// CustomUnmarshable defines an optional interface for custom configuration unmarshaling. +// Unmarshallable defines an optional interface for custom configuration unmarshaling. // A configuration struct can implement this interface to override the default unmarshaling. -type CustomUnmarshable interface { +type Unmarshallable interface { // Unmarshal is a function that un-marshals a Parser into the unmarshable struct in a custom way. // componentSection *Parser // The config for this specific component. May be nil or empty if no config available. diff --git a/config/configloader/config.go b/config/configloader/config.go index c8dc9d5c27e..0181e67841c 100644 --- a/config/configloader/config.go +++ b/config/configloader/config.go @@ -533,7 +533,7 @@ func expandEnv(s string) string { // deprecatedUnmarshaler interface is a deprecated optional interface that if implemented by a Factory, // the configuration loading system will use to unmarshal the config. -// Implement config.CustomUnmarshable on the configuration struct instead. +// Implement config.Unmarshallable on the configuration struct instead. type deprecatedUnmarshaler interface { // Unmarshal is a function that un-marshals a viper data into a config struct in a custom way. // componentViperSection *viper.Viper @@ -544,7 +544,7 @@ type deprecatedUnmarshaler interface { } func unmarshal(componentSection *configparser.Parser, intoCfg interface{}) error { - if cu, ok := intoCfg.(config.CustomUnmarshable); ok { + if cu, ok := intoCfg.(config.Unmarshallable); ok { return cu.Unmarshal(componentSection) } diff --git a/internal/testcomponents/example_exporter.go b/internal/testcomponents/example_exporter.go index d5c0cc9a13a..896ce6002fa 100644 --- a/internal/testcomponents/example_exporter.go +++ b/internal/testcomponents/example_exporter.go @@ -25,7 +25,7 @@ import ( "go.opentelemetry.io/collector/model/pdata" ) -var _ config.CustomUnmarshable = (*ExampleExporter)(nil) +var _ config.Unmarshallable = (*ExampleExporter)(nil) // ExampleExporter is for testing purposes. We are defining an example config and factory // for "exampleexporter" exporter type. diff --git a/receiver/hostmetricsreceiver/config.go b/receiver/hostmetricsreceiver/config.go index 7cf61ff84f0..33e6982721f 100644 --- a/receiver/hostmetricsreceiver/config.go +++ b/receiver/hostmetricsreceiver/config.go @@ -37,7 +37,7 @@ type Config struct { } var _ config.Receiver = (*Config)(nil) -var _ config.CustomUnmarshable = (*Config)(nil) +var _ config.Unmarshallable = (*Config)(nil) // Validate checks the receiver configuration is valid func (cfg *Config) Validate() error { diff --git a/receiver/jaegerreceiver/config.go b/receiver/jaegerreceiver/config.go index 7ed8432eeaa..8579c3faa97 100644 --- a/receiver/jaegerreceiver/config.go +++ b/receiver/jaegerreceiver/config.go @@ -81,7 +81,7 @@ type Config struct { } var _ config.Receiver = (*Config)(nil) -var _ config.CustomUnmarshable = (*Config)(nil) +var _ config.Unmarshallable = (*Config)(nil) // Validate checks the receiver configuration is valid func (cfg *Config) Validate() error { diff --git a/receiver/otlpreceiver/config.go b/receiver/otlpreceiver/config.go index c431baf7f7b..9cc17411046 100644 --- a/receiver/otlpreceiver/config.go +++ b/receiver/otlpreceiver/config.go @@ -44,7 +44,7 @@ type Config struct { } var _ config.Receiver = (*Config)(nil) -var _ config.CustomUnmarshable = (*Config)(nil) +var _ config.Unmarshallable = (*Config)(nil) // Validate checks the receiver configuration is valid func (cfg *Config) Validate() error { diff --git a/receiver/prometheusreceiver/config.go b/receiver/prometheusreceiver/config.go index af310545393..4485cbcc1f8 100644 --- a/receiver/prometheusreceiver/config.go +++ b/receiver/prometheusreceiver/config.go @@ -48,7 +48,7 @@ type Config struct { } var _ config.Receiver = (*Config)(nil) -var _ config.CustomUnmarshable = (*Config)(nil) +var _ config.Unmarshallable = (*Config)(nil) // Validate checks the receiver configuration is valid. func (cfg *Config) Validate() error {