exporter

package
v0.89.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

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

func IsRegistered(name string) bool

IsRegistered checks whether a parser is registered with the given name.

func Register

func Register(name string, builder Builder)

Register adds a new parser builder to the list of known builders.

Types

type Builder

type Builder func(logr.Logger, string, map[interface{}]interface{}) ExporterParser

Builder specifies the signature required for parser builders.

func BuilderFor

func BuilderFor(name string) Builder

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

Ports returns all the service ports for all protocols in this parser.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL