Skip to content

Commit

Permalink
Update function descriptions (#3025)
Browse files Browse the repository at this point in the history
* Made changes to componenttest package

* Changes to nop_exporter_test

* Reverted the changes in exporter and nop_exporter

* Updated comments for the Factory

* reverted usage of singletons
  • Loading branch information
dhruv-vora authored May 12, 2021
1 parent 135a5b6 commit d5891ec
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion component/componenttest/nop_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type nopExtensionFactory struct{}

var nopExtensionFactoryInstance = &nopExtensionFactory{}

// NewNopExtensionFactory returns a component.ExtensionFactory that constructs nop exporters.
// NewNopExtensionFactory returns a component.ExtensionFactory that constructs nop extensions.
func NewNopExtensionFactory() component.ExtensionFactory {
return nopExtensionFactoryInstance
}
Expand Down
2 changes: 1 addition & 1 deletion component/componenttest/nop_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type nopProcessorFactory struct {

var nopProcessorFactoryInstance = &nopProcessorFactory{}

// NewNopProcessorFactory returns a component.ProcessorFactory that constructs nop exporters.
// NewNopProcessorFactory returns a component.ProcessorFactory that constructs nop processors.
func NewNopProcessorFactory() component.ProcessorFactory {
return nopProcessorFactoryInstance
}
Expand Down
2 changes: 1 addition & 1 deletion component/componenttest/nop_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type nopReceiverFactory struct{}

var nopReceiverFactoryInstance = &nopReceiverFactory{}

// NewNopReceiverFactory returns a component.ReceiverFactory that constructs nop exporters.
// NewNopReceiverFactory returns a component.ReceiverFactory that constructs nop receivers.
func NewNopReceiverFactory() component.ReceiverFactory {
return nopReceiverFactoryInstance
}
Expand Down
2 changes: 1 addition & 1 deletion component/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (f *TestExporterFactory) CreateMetricsExporter(context.Context, ExporterCre
return nil, componenterror.ErrDataTypeIsNotSupported
}

// CreateMetricsExporter creates a logs exporter based on this config.
// CreateLogsExporter creates a logs exporter based on this config.
func (f *TestExporterFactory) CreateLogsExporter(context.Context, ExporterCreateParams, config.Exporter) (LogsExporter, error) {
return nil, componenterror.ErrDataTypeIsNotSupported
}
Expand Down
4 changes: 2 additions & 2 deletions component/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ type ReceiverCreateParams struct {
BuildInfo BuildInfo
}

// ReceiverFactory can create TracesReceiver and MetricsReceiver. This is the
// new preferred factory type to create receivers.
// ReceiverFactory can create TracesReceiver, MetricsReceiver and
// and LogsReceiver. This is the new preferred factory type to create receivers.
type ReceiverFactory interface {
Factory

Expand Down

0 comments on commit d5891ec

Please sign in to comment.