Debian Codegraph @

service/hostcapabilities/interfaces.go

raw
1 // Copyright The OpenTelemetry Authors
2 // SPDX-License-Identifier: Apache-2.0
3
4 // Package hostcapabilities provides interfaces that can be implemented by the host
5 // to provide additional capabilities.
6 package hostcapabilities // import "go.opentelemetry.io/collector/service/hostcapabilities"
7
8 import (
9 "go.opentelemetry.io/collector/component"
10 "go.opentelemetry.io/collector/pipeline"
11 "go.opentelemetry.io/collector/service/internal/moduleinfo"
12 )
13
14 // ModuleInfo is an interface that may be implemented by the host to provide
15 // information about modules that were used to build the host.
16 type ModuleInfo interface {
17 // GetModuleInfos returns the module information for the host
18 // i.e. Receivers, Processors, Exporters, Extensions, and Connectors
19 GetModuleInfos() moduleinfo.ModuleInfos
20 }
21
22 // ExposeExporters is an interface that may be implemented by the host to provide
23 // access to the exporters that were used to build the host.
24 //
25 // Deprecated: [v0.121.0] Will be removed in Service 1.0.
26 // See: https://github.com/open-telemetry/opentelemetry-collector/issues/7370 for service 1.0
27 type ExposeExporters interface {
28 GetExporters() map[pipeline.Signal]map[component.ID]component.Component
29 }
30
31 // ComponentFactory is an interface that may be implemented by the host to
32 // provide a component's factory
33 type ComponentFactory interface {
34 // GetFactory returns the component factory for the given
35 // component type
36 GetFactory(kind component.Kind, componentType component.Type) component.Factory
37 }