Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LoadReceiver signature to remove unused params #2823

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Move `config.Load` to use `configparser.Load` (#2796)
- Remove `configtest.NewViperFromYamlFile()`, use `config.Parser.NewParserFromFile()` (#2806)
- Move `config.ViperSubExact()` to use `config.Parser.Sub()` (#2806)
- Update LoadReceiver signature to remove unused params (#2823)

## 💡 Enhancements 💡

Expand Down
4 changes: 2 additions & 2 deletions config/configparser/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func loadService(rawService serviceSettings) (config.Service, error) {
}

// LoadReceiver loads a receiver config from componentConfig using the provided factories.
func LoadReceiver(componentConfig *config.Parser, typeStr config.Type, fullName string, factory component.ReceiverFactory) (config.Receiver, error) {
func LoadReceiver(componentConfig *config.Parser, fullName string, factory component.ReceiverFactory) (config.Receiver, error) {
// Create the default config for this receiver.
receiverCfg := factory.CreateDefaultConfig()
receiverCfg.SetName(fullName)
Expand Down Expand Up @@ -310,7 +310,7 @@ func loadReceivers(recvs map[string]interface{}, factories map[config.Type]compo
return nil, errorUnknownType(receiversKeyName, typeStr, fullName)
}

receiverCfg, err := LoadReceiver(componentConfig, typeStr, fullName, factory)
receiverCfg, err := LoadReceiver(componentConfig, fullName, factory)

if err != nil {
// LoadReceiver already wraps the error.
Expand Down