Skip to content

Commit

Permalink
Moves internal/kafka To pkg/kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
wicklander-bryant committed May 21, 2024
1 parent 80317ce commit ea9f517
Show file tree
Hide file tree
Showing 37 changed files with 37 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ internal/exp/metrics/ @open-telemetry/collect
internal/filter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers
internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax
internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1
internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy
pkg/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy
internal/kubelet/ @open-telemetry/collector-contrib-approvers @dmitryax
internal/metadataproviders/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole
internal/sharedcomponent/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ body:
- internal/filter
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- pkg/kafka
- internal/kubelet
- internal/metadataproviders
- internal/sharedcomponent
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ body:
- internal/filter
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- pkg/kafka
- internal/kubelet
- internal/metadataproviders
- internal/sharedcomponent
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ body:
- internal/filter
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- pkg/kafka
- internal/kubelet
- internal/metadataproviders
- internal/sharedcomponent
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/unmaintained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ body:
- internal/filter
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- pkg/kafka
- internal/kubelet
- internal/metadataproviders
- internal/sharedcomponent
Expand Down
4 changes: 2 additions & 2 deletions cmd/configschema/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -563,9 +563,9 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.101.0 // indirect
Expand Down Expand Up @@ -810,7 +810,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/docke

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet => ../../internal/kubelet

Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ replaces:
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter => ../../exporter/azuredataexplorerexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka
- github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka
- github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ../../receiver/carbonreceiver
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter => ../../exporter/splunkhecexporter
- github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter => ../../exporter/prometheusexporter
Expand Down
4 changes: 2 additions & 2 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.101.0 // indirect
Expand Down Expand Up @@ -1041,7 +1041,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sco

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka

replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ../../receiver/carbonreceiver

Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/collector/config/configretry"
"go.opentelemetry.io/collector/exporter/exporterhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

// Config defines configuration for Kafka exporter.
Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"go.opentelemetry.io/collector/exporter/exporterhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/internal/metadata"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

func TestLoadConfig(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions exporter/kafkaexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/jaegertracing/jaeger v1.57.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.101.0
Expand Down Expand Up @@ -95,7 +95,7 @@ require (

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../../pkg/batchpersignal

Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/kafka_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"go.opentelemetry.io/collector/pdata/ptrace"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

var errUnrecognizedEncoding = fmt.Errorf("unrecognized encoding")
Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/kafka_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"go.opentelemetry.io/collector/pdata/testdata"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

func TestNewExporter_err_version(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,6 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.101.0 // indirect
Expand All @@ -575,6 +574,7 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.101.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.101.0 // indirect
Expand Down Expand Up @@ -809,7 +809,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sco

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ./internal/k8stest

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ./internal/kafka
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ./pkg/kafka

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet => ./internal/kubelet

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"

import (
"context"
Expand All @@ -12,7 +12,7 @@ import (
"github.com/IBM/sarama"
"go.opentelemetry.io/collector/config/configtls"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/awsmsk"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/awsmsk"
)

// Authentication defines authentication.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/kafka/awsmsk/doc.go → pkg/kafka/awsmsk/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
// Further details on how the SASL connector works can be viewed here:
//
// https://github.com/aws/aws-msk-iam-auth#details
package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/awsmsk"
package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/awsmsk"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/awsmsk"
package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/awsmsk"

import (
"encoding/json"
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/kafka/go.mod → pkg/kafka/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka
module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka

go 1.21.0

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"

import (
"github.com/IBM/sarama"
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package kafkametricsreceiver // import "github.com/open-telemetry/opentelemetry-
import (
"go.opentelemetry.io/collector/receiver/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver/internal/metadata"
)

Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/collector/confmap/confmaptest"
"go.opentelemetry.io/collector/receiver/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver/internal/metadata"
)

Expand Down
4 changes: 2 additions & 2 deletions receiver/kafkametricsreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21.0
require (
github.com/IBM/sarama v1.43.2
github.com/google/go-cmp v0.6.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.101.0
github.com/stretchr/testify v1.9.0
go.opentelemetry.io/collector/component v0.101.0
go.opentelemetry.io/collector/config/configtls v0.101.0
Expand Down Expand Up @@ -81,7 +81,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka

// see https://github.com/distribution/distribution/issues/3590
exclude github.com/docker/distribution v2.8.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"go.opentelemetry.io/collector/receiver"
"go.opentelemetry.io/collector/receiver/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"go.opentelemetry.io/collector/receiver/receivertest"
"go.opentelemetry.io/collector/receiver/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

func TestNewReceiver_invalid_version_err(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"go.opentelemetry.io/collector/component"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

type AutoCommit struct {
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"go.opentelemetry.io/collector/confmap/confmaptest"

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver/internal/metadata"
)

Expand Down
4 changes: 2 additions & 2 deletions receiver/kafkareceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.101.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.101.0
Expand Down Expand Up @@ -104,7 +104,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafka

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal

replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka
replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka

replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger => ../../pkg/translator/jaeger

Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/kafka_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"go.opentelemetry.io/collector/receiver/receiverhelper"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/kafka_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/textutils"
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka"
"github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka"
)

func TestNewTracesReceiver_version_err(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ module-sets:
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka
- github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders
- github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent
Expand Down

0 comments on commit ea9f517

Please sign in to comment.