Documentation ¶
Overview ¶
Package adapters is for data conversion.
Index ¶
- Variables
- func ConfigFromString(configStr string) (map[interface{}]interface{}, error)
- func ConfigToComponentPorts(logger logr.Logger, cType ComponentType, config map[interface{}]interface{}) ([]corev1.ServicePort, error)
- func ConfigToContainerProbe(config map[interface{}]interface{}) (*corev1.Probe, error)
- func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error)
- func ConfigToRBAC(logger logr.Logger, config map[interface{}]interface{}) []rbacv1.PolicyRule
- type ComponentType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoServiceExtensions = errors.New("service property in the configuration doesn't contain extensions") ErrNoServiceExtensionHealthCheck = errors.New("no healthcheck extension available in service extension configuration") )
View Source
var ( // ErrInvalidYAML represents an error in the format of the configuration file. ErrInvalidYAML = errors.New("couldn't parse the opentelemetry-collector configuration") )
Functions ¶
func ConfigFromString ¶
ConfigFromString extracts a configuration map from the given string. If the given string isn't a valid YAML, ErrInvalidYAML is returned.
func ConfigToComponentPorts ¶ added in v0.90.0
func ConfigToComponentPorts(logger logr.Logger, cType ComponentType, config map[interface{}]interface{}) ([]corev1.ServicePort, error)
ConfigToComponentPorts converts the incoming configuration object into a set of service ports required by the exporters.
func ConfigToContainerProbe ¶
ConfigToContainerProbe converts the incoming configuration object into a container probe or returns an error.
func ConfigToPorts ¶ added in v0.84.0
func ConfigToPorts(logger logr.Logger, config map[interface{}]interface{}) ([]corev1.ServicePort, error)
func ConfigToRBAC ¶ added in v0.92.0
func ConfigToRBAC(logger logr.Logger, config map[interface{}]interface{}) []rbacv1.PolicyRule
ConfigToRBAC parses the OpenTelemetry Collector configuration and checks what RBAC resources are needed to be created.
Types ¶
type ComponentType ¶ added in v0.90.0
type ComponentType int
const ( ComponentTypeReceiver ComponentType = iota ComponentTypeExporter ComponentTypeProcessor )
func (ComponentType) String ¶ added in v0.90.0
func (c ComponentType) String() string
Click to show internal directories.
Click to hide internal directories.