Skip to content

Commit

Permalink
Remove deprecated fields/funcs from service (#5907)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan <[email protected]>

Signed-off-by: Bogdan <[email protected]>
  • Loading branch information
bogdandrutu authored Aug 17, 2022
1 parent ddc996f commit 3e9de18
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

### 🛑 Breaking changes 🛑

- Remove deprecated fields/funcs from `service` (#5907)
- Remove `ConfigProviderSettings.Location`
- Remove `ConfigProviderSettings.MapProviders`
- Remove `ConfigProviderSettings.MapConverters`
- Remove `featuregate.Registry.MustAppy`
- Remove deprecated funcs from `pdata` module. (#5911)
- Remove `pmetric.MetricDataPointFlags.String()`
- Remove `pmetric.NumberDataPoint.FlagsStruct()`
Expand Down
18 changes: 0 additions & 18 deletions service/config_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ type configProvider struct {
type ConfigProviderSettings struct {
// ResolverSettings are the settings to configure the behavior of the confmap.Resolver.
ResolverSettings confmap.ResolverSettings

// Deprecated: [v0.58.0] use ConfigProviderSettings.ResolverSettings.URIs
Locations []string

// Deprecated: [v0.58.0] use ConfigProviderSettings.ResolverSettings.Providers
MapProviders map[string]confmap.Provider

// Deprecated: [v0.58.0] use ConfigProviderSettings.ResolverSettings.Converter
MapConverters []confmap.Converter
}

func newDefaultConfigProviderSettings(uris []string) ConfigProviderSettings {
Expand All @@ -98,15 +89,6 @@ func newDefaultConfigProviderSettings(uris []string) ConfigProviderSettings {
//
// * Then unmarshalls the confmap.Conf into the service Config.
func NewConfigProvider(set ConfigProviderSettings) (ConfigProvider, error) {
if len(set.Locations) != 0 {
set.ResolverSettings.URIs = set.Locations
}
if len(set.MapProviders) != 0 {
set.ResolverSettings.Providers = set.MapProviders
}
if len(set.MapConverters) != 0 {
set.ResolverSettings.Converters = set.MapConverters
}
mr, err := confmap.NewResolver(set.ResolverSettings)
if err != nil {
return nil, err
Expand Down
7 changes: 0 additions & 7 deletions service/featuregate/gates.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,6 @@ func (r *Registry) Apply(cfg map[string]bool) error {
return nil
}

// Deprecated: [v0.58.0] Use Apply instead.
func (r *Registry) MustApply(cfg map[string]bool) {
if err := r.Apply(cfg); err != nil {
panic(err)
}
}

// IsEnabled returns true if a registered feature gate is enabled and false otherwise.
func (r *Registry) IsEnabled(id string) bool {
r.mu.RLock()
Expand Down

0 comments on commit 3e9de18

Please sign in to comment.