From 52e67b9b336d1b0360c8349a1ff1d05bce7dd84b Mon Sep 17 00:00:00 2001 From: Dan Jaglowski Date: Tue, 22 Nov 2022 11:38:37 -0500 Subject: [PATCH] Use component.Config --- config/connector.go | 5 ++--- connector/connector.go | 8 -------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/config/connector.go b/config/connector.go index 2758d867d914..42f804f78fe8 100644 --- a/config/connector.go +++ b/config/connector.go @@ -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. @@ -26,7 +25,7 @@ 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. @@ -34,7 +33,7 @@ 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 { diff --git a/connector/connector.go b/connector/connector.go index e531c46b98d4..9c172e47bd2a 100644 --- a/connector/connector.go +++ b/connector/connector.go @@ -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.