Skip to content

Commit

Permalink
Remove deprecated NewConfigProvider funcs (#4937)
Browse files Browse the repository at this point in the history
This PR does not add the new versions of the `NewConfigProvider` since we are still designing/reviewing that change.

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Mar 2, 2022
1 parent f2c295b commit 5f2d874
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- Remove support for legacy otlp/http port. (#4916)
- Remove deprecated funcs in pdata (#4809)
- Remove deprecated Retrieve funcs/calls (#4922)
- Remove deprecated NewConfigProvider funcs (#4937)

### 💡 Enhancements 💡

Expand Down
28 changes: 1 addition & 27 deletions service/config_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,7 @@ type configProvider struct {
// * Then unmarshalls the final config.Config using the given configunmarshaler.ConfigUnmarshaler.
//
// The `configMapProviders` is a map of pairs <scheme,Provider>.
//
// Notice: This API is experimental.
func MustNewConfigProvider(
locations []string,
configMapProviders map[string]configmapprovider.Provider,
cfgMapConverters []config.MapConverterFunc,
configUnmarshaler configunmarshaler.ConfigUnmarshaler) ConfigProvider {
return NewConfigProvider(locations, configMapProviders, cfgMapConverters, configUnmarshaler)
}

// Deprecated: [v0.44.0] use MustNewConfigProvider instead
// NewConfigProvider returns a new ConfigProvider that provides the configuration:
// * Retrieve the config.Map by merging all retrieved maps from all the configmapprovider.Provider in order.
// * Then applies all the config.MapConverterFunc in the given order.
// * Then unmarshalls the final config.Config using the given configunmarshaler.ConfigUnmarshaler.
//
// The `configMapProviders` is a map of pairs <scheme,Provider>.
//
// Notice: This API is experimental.
func NewConfigProvider(
locations []string,
configMapProviders map[string]configmapprovider.Provider,
cfgMapConverters []config.MapConverterFunc,
Expand All @@ -120,14 +101,7 @@ func NewConfigProvider(
// MustNewDefaultConfigProvider returns the default ConfigProvider, and it creates configuration from a file
// defined by the given configFile and overwrites fields using properties.
func MustNewDefaultConfigProvider(configLocations []string, properties []string) ConfigProvider {
return NewDefaultConfigProvider(configLocations, properties)
}

// Deprecated: [v.0.44.0] use MustNewDefaultConfigProvider instead
// NewDefaultConfigProvider returns the default ConfigProvider, and it creates configuration from a file
// defined by the given configFile and overwrites fields using properties.
func NewDefaultConfigProvider(configLocations []string, properties []string) ConfigProvider {
return NewConfigProvider(
return MustNewConfigProvider(
configLocations,
map[string]configmapprovider.Provider{
"file": configmapprovider.NewFile(),
Expand Down

0 comments on commit 5f2d874

Please sign in to comment.