Documentation ¶
Overview ¶
Package parser is for parsing the OpenTelemetry Collector configuration.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsRegistered ¶
IsRegistered checks whether a parser is registered with the given name.
Types ¶
type Builder ¶
type Builder func(logr.Logger, string, map[interface{}]interface{}) ExporterParser
Builder specifies the signature required for parser builders.
func BuilderFor ¶
BuilderFor returns a parser builder for the given exporter name.
type ExporterParser ¶
type ExporterParser interface { // Ports returns the service ports parsed based on the exporter's configuration Ports() ([]corev1.ServicePort, error) // ParserName returns the name of this parser ParserName() string }
ExporterParser is an interface that should be implemented by all exporter parsers.
func For ¶
func For(logger logr.Logger, name string, config map[interface{}]interface{}) (ExporterParser, error)
For returns a new parser for the given exporter name + config.
func NewPrometheusExporterParser ¶
func NewPrometheusExporterParser(logger logr.Logger, name string, config map[interface{}]interface{}) ExporterParser
NewPrometheusExporterParser builds a new parser for OTLP receivers.
type PrometheusExporterParser ¶
type PrometheusExporterParser struct {
// contains filtered or unexported fields
}
PrometheusExporterParser parses the configuration for OTLP receivers.
func (*PrometheusExporterParser) ParserName ¶
func (o *PrometheusExporterParser) ParserName() string
ParserName returns the name of this parser.
func (*PrometheusExporterParser) Ports ¶
func (o *PrometheusExporterParser) Ports() ([]corev1.ServicePort, error)
Ports returns all the service ports for all protocols in this parser.