Skip to content

Commit 2bb2613

Browse files
authored
[component] Remove deprecated Host.GetFactory method (#10771)
#### Description Removes the deprecated `GetFactory` method from the `component.Host` interface <!-- Issue number if applicable --> #### Link to tracking issue Closes #9511
1 parent c0188e0 commit 2bb2613

File tree

2 files changed

+25
-15
lines changed

2 files changed

+25
-15
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: breaking
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
7+
component: component
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Removes the deprecated `Host.GetFactory` method.
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [10771]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# Optional: The change log or logs in which this entry should be included.
21+
# e.g. '[user]' or '[user, api]'
22+
# Include 'user' if the change is relevant to end users.
23+
# Include 'api' if there is a change to a library API.
24+
# Default: '[user]'
25+
change_logs: [api]

component/host.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,6 @@ package component // import "go.opentelemetry.io/collector/component"
1010
// The component is expected to cast the `component.Host` to the interface it needs and return
1111
// an error if the type assertion fails.
1212
type Host interface {
13-
// GetFactory of the specified kind. Returns the factory for a component type.
14-
// This allows components to create other components. For example:
15-
// func (r MyReceiver) Start(host component.Host) error {
16-
// apacheFactory := host.GetFactory(KindReceiver,"apache").(receiver.Factory)
17-
// receiver, err := apacheFactory.CreateMetrics(...)
18-
// ...
19-
// }
20-
//
21-
// GetFactory can be called by the component anytime after Component.Start() begins and
22-
// until Component.Shutdown() ends. Note that the component is responsible for destroying
23-
// other components that it creates.
24-
//
25-
// Deprecated: [v0.106.0] component.Host no longer requires implementors to expose a GetFactory function.
26-
GetFactory(kind Kind, componentType Type) Factory
27-
2813
// GetExtensions returns the map of extensions. Only enabled and created extensions will be returned.
2914
// Typically, it is used to find an extension by type or by full config name. Both cases
3015
// can be done by iterating the returned map. There are typically very few extensions,

0 commit comments

Comments
 (0)