kafkareceiver

package
v0.0.0-...-5deca64 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const TypeStr = "kafka"

TypeStr defines receiver type.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flags *flag.FlagSet)

AddFlags adds Ingester flags.

Types

type Factory

type Factory struct {
	// Wrapped is Kafka receiver.
	Wrapped component.ReceiverFactory
	// Viper is used to get configuration values for default configuration
	Viper *viper.Viper
}

Factory wraps kafkareceiver.Factory and makes the default config configurable via viper. For instance this enables using flags as default values in the config object.

func (*Factory) CreateDefaultConfig

func (f *Factory) CreateDefaultConfig() configmodels.Receiver

CreateDefaultConfig returns default configuration of Factory. This function implements OTEL component.ReceiverFactoryBase interface.

func (Factory) CreateLogsReceiver

func (f Factory) CreateLogsReceiver(
	ctx context.Context,
	params component.ReceiverCreateParams,
	cfg configmodels.Receiver,
	nextConsumer consumer.LogsConsumer,
) (component.LogsReceiver, error)

CreateLogsReceiver creates a receiver based on the config. If the receiver type does not support logs or if the config is not valid error will be returned instead.

func (*Factory) CreateMetricsReceiver

func (f *Factory) CreateMetricsReceiver(
	ctx context.Context,
	params component.ReceiverCreateParams,
	cfg configmodels.Receiver,
	nextConsumer consumer.MetricsConsumer,
) (component.MetricsReceiver, error)

CreateMetricsReceiver creates a metrics receiver based on provided config. This function implements component.ReceiverFactory.

func (*Factory) CreateTracesReceiver

func (f *Factory) CreateTracesReceiver(
	ctx context.Context,
	params component.ReceiverCreateParams,
	cfg configmodels.Receiver,
	nextConsumer consumer.TracesConsumer,
) (component.TracesReceiver, error)

CreateTracesReceiver creates Jaeger receiver trace receiver. This function implements OTEL component.ReceiverFactory interface.

func (*Factory) Type

func (f *Factory) Type() configmodels.Type

Type returns the type of the receiver.

Jump to

Keyboard shortcuts

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