Skip to content

[chore][component] Document component.Host expectations #10720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions component/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ package component // import "go.opentelemetry.io/collector/component"

// Host represents the entity that is hosting a Component. It is used to allow communication
// between the Component and its host (normally the service.Collector is the host).
//
// Components may require `component.Host` to implement additional interfaces to properly function.
// The component is expected to cast the `component.Host` to the interface it needs and return
// an error if the type assertion fails.
type Host interface {
// GetFactory of the specified kind. Returns the factory for a component type.
// This allows components to create other components. For example:
Expand Down
Loading