Skip to content

Commit

Permalink
Move Timeout parameter to ScraperControllerSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
technimad-splunk committed Aug 25, 2023
1 parent 297448d commit 2e6f18e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions receiver/snmpreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ type Config struct {
// If no port is given, 161 is assumed.
Endpoint string `mapstructure:"endpoint"`

// Timeout for each SNMP request.
// Default: 5 seconds
Timeout time.Duration `mapstructure:"timeout"`

// Version is the version of SNMP to use for this connection.
// Valid options: v1, v2c, v3.
// Default: v2c
Expand Down
2 changes: 1 addition & 1 deletion receiver/snmpreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ func createDefaultConfig() component.Config {
return &Config{
ScraperControllerSettings: scraperhelper.ScraperControllerSettings{
CollectionInterval: defaultCollectionInterval,
Timeout: defaultTimeout,
},
Endpoint: defaultEndpoint,
Timeout: defaultTimeout,
Version: defaultVersion,
Community: defaultCommunity,
SecurityLevel: defaultSecurityLevel,
Expand Down
2 changes: 1 addition & 1 deletion receiver/snmpreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ func TestNewFactory(t *testing.T) {
var expectedCfg component.Config = &Config{
ScraperControllerSettings: scraperhelper.ScraperControllerSettings{
CollectionInterval: defaultCollectionInterval,
Timeout: defaultTimeout,
},
Endpoint: defaultEndpoint,
Timeout: defaultTimeout,
Version: defaultVersion,
Community: defaultCommunity,
SecurityLevel: "no_auth_no_priv",
Expand Down

0 comments on commit 2e6f18e

Please sign in to comment.