Skip to content

Commit

Permalink
Use component.Config
Browse files Browse the repository at this point in the history
  • Loading branch information
djaglowski committed Nov 22, 2022
1 parent e5efc50 commit 52e67b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 2 additions & 3 deletions config/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package config // import "go.opentelemetry.io/collector/config"
import (
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/connector"
)

// ConnectorSettings defines common settings for a component.Connector configuration.
Expand All @@ -26,15 +25,15 @@ import (
// When embedded in the exporter config, it must be with `mapstructure:",squash"` tag.
type ConnectorSettings struct {
id component.ID `mapstructure:"-"`
connector.Config
component.Config
}

// NewConnectorSettings return a new ConnectorSettings with the given ComponentID.
func NewConnectorSettings(id component.ID) ConnectorSettings {
return ConnectorSettings{id: id}
}

var _ connector.Config = (*ConnectorSettings)(nil)
var _ component.Config = (*ConnectorSettings)(nil)

// ID returns the receiver ComponentID.
func (cs *ConnectorSettings) ID() component.ID {
Expand Down
8 changes: 0 additions & 8 deletions connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ import (
"go.opentelemetry.io/collector/component"
)

// Config is the configuration of a connector.Connector. Specific extensions must implement
// this interface and must embed ConnectorSettings struct or a struct that extends it.
type Config interface {
component.Config

privateConfigConnector()
}

// Connector sends telemetry data from one pipeline to another. A connector
// is both an exporter and receiver, working together to connect pipelines.
// The purpose is to allow for differentiated processing of telemetry data.
Expand Down

0 comments on commit 52e67b9

Please sign in to comment.