Skip to content

Commit

Permalink
[connector,exporter,receiver,extension,processor] remove deprecated f…
Browse files Browse the repository at this point in the history
…uncs/structs (#10423)

Finishing CreateSettings rename.

Signed-off-by: Alex Boten <[email protected]>
  • Loading branch information
codeboten authored Jul 19, 2024
1 parent 2449345 commit e590ed1
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 60 deletions.
38 changes: 38 additions & 0 deletions .chloggen/codeboten_rm-deprecated-103.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: connector,exporter,receiver,extension,processor

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated funcs/structs

# One or more tracking issues or pull requests related to the change
issues: [10423]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext: |
Remove the following funcs & structs:
- connector.CreateSettings -> connector.Settings
- connectortest.NewNopCreateSettings -> connectortest.NewNopSettings
- exporter.CreateSettings -> exporter.Settings
- exportertest.NewNopCreateSettings -> exportertest.NewNopSettings
- extension.CreateSettings -> extension.Settings
- extensiontest.NewNopCreateSettings -> extensiontest.NewNopSettings
- processor.CreateSettings -> processor.Settings
- processortest.NewNopCreateSettings -> processortest.NewNopSettings
- receiver.CreateSettings -> receiver.Settings
- receivertest.NewNopCreateSettings -> receivertest.NewNopSettings
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [api]
5 changes: 0 additions & 5 deletions connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ type Metrics = internal.Metrics
// pipeline can then process and export the log to the appropriate backend.
type Logs = internal.Logs

// CreateSettings configures Connector creators.
//
// Deprecated: [v0.103.0] Use connector.Settings instead.
type CreateSettings = internal.Settings

// Settings configures Connector creators.
type Settings = internal.Settings

Expand Down
7 changes: 0 additions & 7 deletions connector/connectortest/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ import (

var nopType = component.MustNewType("nop")

// NewNopCreateSettings returns a new nop settings for Create* functions.
//
// Deprecated: [v0.103.0] Use connectortest.NewNopSettings instead.
func NewNopCreateSettings() connector.Settings {
return NewNopSettings()
}

// NewNopSettings returns a new nop settings for Create* functions.
func NewNopSettings() connector.Settings {
return connector.Settings{
Expand Down
5 changes: 0 additions & 5 deletions exporter/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ type Metrics = internal.Metrics
// Logs is an exporter that can consume logs.
type Logs = internal.Logs

// CreateSettings configures Exporter creators.
//
// Deprecated: [v0.103.0] Use exporter.Settings instead.
type CreateSettings = internal.Settings

// Settings configures exporter creators.
type Settings = internal.Settings

Expand Down
7 changes: 0 additions & 7 deletions exporter/exportertest/nop_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ import (

var nopType = component.MustNewType("nop")

// NewNopCreateSettings returns a new nop settings for Create*Exporter functions.
//
// Deprecated: [v0.103.0] Use exportertest.NewNopSettings instead.
func NewNopCreateSettings() exporter.Settings {
return NewNopSettings()
}

// NewNopSettings returns a new nop settings for Create*Exporter functions.
func NewNopSettings() exporter.Settings {
return exporter.Settings{
Expand Down
5 changes: 0 additions & 5 deletions extension/extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ type StatusWatcher interface {
ComponentStatusChanged(source *component.InstanceID, event *component.StatusEvent)
}

// CreateSettings is passed to Factory.Create(...) function.
//
// Deprecated: [v0.103.0] Use extension.Settings instead.
type CreateSettings = Settings

// Settings is passed to Factory.Create(...) function.
type Settings struct {
// ID returns the ID of the component that will be created.
Expand Down
7 changes: 0 additions & 7 deletions extension/extensiontest/nop_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ import (

var nopType = component.MustNewType("nop")

// NewNopCreateSettings returns a new nop settings for extension.Factory Create* functions.
//
// Deprecated: [v0.103.0] Use extensiontest.NewNopSettings instead.
func NewNopCreateSettings() extension.Settings {
return NewNopSettings()
}

// NewNopSettings returns a new nop settings for extension.Factory Create* functions.
func NewNopSettings() extension.Settings {
return extension.Settings{
Expand Down
5 changes: 0 additions & 5 deletions processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ type Metrics = internal.Metrics
// Logs is a processor that can consume logs.
type Logs = internal.Logs

// CreateSettings is passed to Create* functions in Factory.
//
// Deprecated: [v0.103.0] Use processor.Settings instead.
type CreateSettings = internal.Settings

// Settings is passed to Create* functions in Factory.
type Settings = internal.Settings

Expand Down
7 changes: 0 additions & 7 deletions processor/processortest/nop_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,6 @@ import (

var nopType = component.MustNewType("nop")

// NewNopCreateSettings returns a new nop settings for Create*Processor functions.
//
// Deprecated: [v0.103.0] Use processortest.NewNopSettings instead.
func NewNopCreateSettings() processor.Settings {
return NewNopSettings()
}

// NewNopSettings returns a new nop settings for Create*Processor functions.
func NewNopSettings() processor.Settings {
return processor.Settings{
Expand Down
5 changes: 0 additions & 5 deletions receiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ type Metrics = internal.Metrics
// For example, it could be a receiver that reads syslogs and convert them into plog.Logs.
type Logs = internal.Logs

// CreateSettings configures Receiver creators.
//
// Deprecated: [v0.103.0] Use receiver.Settings instead.
type CreateSettings = internal.Settings

// Settings configures Receiver creators.
type Settings = internal.Settings

Expand Down
7 changes: 0 additions & 7 deletions receiver/receivertest/nop_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ import (

var defaultComponentType = component.MustNewType("nop")

// NewNopCreateSettings returns a new nop settings for Create*Receiver functions.
//
// Deprecated: [v0.103.0] Use receivertest.NewNopSettings instead.
func NewNopCreateSettings() receiver.Settings {
return NewNopSettings()
}

// NewNopSettings returns a new nop settings for Create*Receiver functions.
func NewNopSettings() receiver.Settings {
return receiver.Settings{
Expand Down

0 comments on commit e590ed1

Please sign in to comment.