Documentation ¶
Overview ¶
Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/30187
Index ¶
Constants ¶
const DefaultModule = "github.com/open-telemetry/opentelemetry-collector-contrib"
DefaultModule is the module prefix of contrib. Can be used to create a DirResolver.
const DefaultSrcRoot = "."
DefaultSrcRoot is the default root of the collector repo, relative to the current working directory. Can be used to create a DirResolver.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CfgInfo ¶
type CfgInfo struct { // the name of the component group, e.g. "receiver" Group string // the component type, e.g. "otlpreceiver.Config" Type component.Type // an instance of the component's configuration struct CfgInstance any }
CfgInfo contains a component config instance, as well as its group name and type.
func GetAllCfgInfos ¶
GetAllCfgInfos accepts a Factories struct, then creates and returns a CfgInfo for each of its components.
type DirResolver ¶
DirResolver is used to resolve the base directory of a given reflect.Type.
func NewDefaultDirResolver ¶
func NewDefaultDirResolver() DirResolver
NewDefaultDirResolver creates a DirResolver with a default SrcRoot and ModuleName, suitable for using this package's API using otelcol with an executable running from the otelcol's source root (not tests).
func NewDirResolver ¶
func NewDirResolver(srcRoot string, moduleName string) DirResolver
NewDirResolver creates a DirResolver with a custom SrcRoot and ModuleName. Useful for testing and for using this package's API from a repository other than otelcol (e.g. contrib).
func (DirResolver) ReflectValueToProjectPath ¶ added in v0.67.0
func (dr DirResolver) ReflectValueToProjectPath(v reflect.Value) string
ReflectValueToProjectPath accepts a reflect.Value and returns its directory in the current project. If the type doesn't live in the current project, returns "".
func (DirResolver) TypeToPackagePath ¶ added in v0.59.0
func (dr DirResolver) TypeToPackagePath(t reflect.Type) (string, error)
TypeToPackagePath accepts a Type and returns the filesystem path. If the path does not exist in the current project, returns location in GOPATH.
type DirResolverIntf ¶ added in v0.67.0
type Field ¶
type Field struct { Name string `yaml:",omitempty"` Type string `yaml:",omitempty"` Kind string `yaml:",omitempty"` Default any `yaml:",omitempty"` Doc string `yaml:",omitempty"` Fields []*Field `yaml:",omitempty"` }
Field holds attributes and subfields of a config struct.
func ReadFields ¶
func ReadFields(v reflect.Value, dr DirResolver) (*Field, error)
ReadFields accepts both a config struct's Value, as well as a DirResolver, and returns a Field pointer for the top level struct as well as all of its recursive subfields.
Directories ¶
Path | Synopsis |
---|---|
Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release.
|
Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. |
Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release.
|
Deprecated: [v0.92.0] This package is deprecated and will be removed in a future release. |