Documentation ¶
Overview ¶
Package consumerhelper defines types and functions used to create consumer Logs, Metrics, and Traces.
Index ¶
- func NewLogs(consume ConsumeLogsFunc, options ...Option) (consumer.Logs, error)
- func NewMetrics(consume ConsumeMetricsFunc, options ...Option) (consumer.Metrics, error)
- func NewTraces(consume ConsumeTracesFunc, options ...Option) (consumer.Traces, error)
- type ConsumeLogsFunc
- type ConsumeMetricsFunc
- type ConsumeTracesFunc
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogs ¶
func NewLogs(consume ConsumeLogsFunc, options ...Option) (consumer.Logs, error)
NewLogs returns a consumer.Logs configured with the provided options.
func NewMetrics ¶
func NewMetrics(consume ConsumeMetricsFunc, options ...Option) (consumer.Metrics, error)
NewMetrics returns a consumer.Metrics configured with the provided options.
Types ¶
type ConsumeLogsFunc ¶
ConsumeLogsFunc is a helper function that is similar to ConsumeLogs.
func (ConsumeLogsFunc) ConsumeLogs ¶
ConsumeLogs calls f(ctx, ld).
type ConsumeMetricsFunc ¶
ConsumeMetricsFunc is a helper function that is similar to ConsumeMetrics.
func (ConsumeMetricsFunc) ConsumeMetrics ¶
ConsumeMetrics calls f(ctx, ld).
type ConsumeTracesFunc ¶
ConsumeTracesFunc is a helper function that is similar to ConsumeTraces.
func (ConsumeTracesFunc) ConsumeTraces ¶
ConsumeTraces calls f(ctx, ld).
type Option ¶
type Option func(*baseConsumer)
Option applies changes to internalOptions.
func WithCapabilities ¶
func WithCapabilities(capabilities consumer.Capabilities) Option
WithCapabilities overrides the default GetCapabilities function for a processor. The default GetCapabilities function returns mutable capabilities.