Skip to content

Commit

Permalink
Remove ConsumerOld
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Aug 25, 2020
1 parent 79f22a8 commit a0e3a25
Show file tree
Hide file tree
Showing 13 changed files with 142 additions and 1,234 deletions.
27 changes: 0 additions & 27 deletions consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,18 @@ package consumer
import (
"context"

"go.opentelemetry.io/collector/consumer/consumerdata"
"go.opentelemetry.io/collector/consumer/pdata"
)

// MetricsConsumerBase defines a common interface for MetricsConsumerOld and MetricsConsumer.
type MetricsConsumerBase interface{}

// MetricsConsumerOld is an interface that receives consumerdata.MetricsData, process it as needed, and
// sends it to the next processing node if any or to the destination.
//
// ConsumeMetricsData receives consumerdata.MetricsData for processing by the MetricsConsumer.
type MetricsConsumerOld interface {
MetricsConsumerBase
ConsumeMetricsData(ctx context.Context, md consumerdata.MetricsData) error
}

// MetricsConsumer is the new metrics consumer interface that receives pdata.MetricData, processes it
// as needed, and sends it to the next processing node if any or to the destination.
type MetricsConsumer interface {
MetricsConsumerBase
ConsumeMetrics(ctx context.Context, md pdata.Metrics) error
}

// TraceConsumerBase defines a common interface for TraceConsumerOld and TraceConsumer.
type TraceConsumerBase interface{}

// TraceConsumerOld is an interface that receives consumerdata.TraceData, process it as needed, and
// sends it to the next processing node if any or to the destination.
//
// ConsumeTraceData receives consumerdata.TraceData for processing by the TraceConsumer.
type TraceConsumerOld interface {
TraceConsumerBase
ConsumeTraceData(ctx context.Context, td consumerdata.TraceData) error
}

// TraceConsumer is an interface that receives pdata.Traces, processes it
// as needed, and sends it to the next processing node if any or to the destination.
type TraceConsumer interface {
TraceConsumerBase
// ConsumeTraces receives pdata.Traces for processing.
ConsumeTraces(ctx context.Context, td pdata.Traces) error
}
Expand Down
129 changes: 0 additions & 129 deletions consumer/converter/converter.go

This file was deleted.

102 changes: 0 additions & 102 deletions consumer/converter/converter_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions exporter/exportertest/nop_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ func (ne *nopExporter) Shutdown(context.Context) error {
return nil
}

// NewNopTraceExporterOld creates an TraceExporter that just drops the received data.
// NewNopTraceExporter creates an TraceExporter that just drops the received data.
func NewNopTraceExporter() component.TraceExporter {
ne := &nopExporter{
name: nopTraceExporterName,
}
return ne
}

// NewNopMetricsExporterOld creates an MetricsExporter that just drops the received data.
// NewNopMetricsExporter creates an MetricsExporter that just drops the received data.
func NewNopMetricsExporter() component.MetricsExporter {
ne := &nopExporter{
name: nopMetricsExporterName,
}
return ne
}

// NewNopLogsExporterOld creates an LogsExporter that just drops the received data.
// NewNopLogsExporter creates an LogsExporter that just drops the received data.
func NewNopLogsExporter() component.LogsExporter {
ne := &nopExporter{
name: nopLogsExporterName,
Expand Down
Loading

0 comments on commit a0e3a25

Please sign in to comment.