consumerhelper

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package consumerhelper defines types and functions used to create consumer Logs, Metrics, and Traces.

Index

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.

func NewTraces

func NewTraces(consume ConsumeTracesFunc, options ...Option) (consumer.Traces, error)

NewTraces returns a consumer.Traces configured with the provided options.

Types

type ConsumeLogsFunc

type ConsumeLogsFunc func(ctx context.Context, ld pdata.Logs) error

ConsumeLogsFunc is a helper function that is similar to ConsumeLogs.

func (ConsumeLogsFunc) ConsumeLogs

func (f ConsumeLogsFunc) ConsumeLogs(ctx context.Context, ld pdata.Logs) error

ConsumeLogs calls f(ctx, ld).

type ConsumeMetricsFunc

type ConsumeMetricsFunc func(ctx context.Context, ld pdata.Metrics) error

ConsumeMetricsFunc is a helper function that is similar to ConsumeMetrics.

func (ConsumeMetricsFunc) ConsumeMetrics

func (f ConsumeMetricsFunc) ConsumeMetrics(ctx context.Context, ld pdata.Metrics) error

ConsumeMetrics calls f(ctx, ld).

type ConsumeTracesFunc

type ConsumeTracesFunc func(ctx context.Context, ld pdata.Traces) error

ConsumeTracesFunc is a helper function that is similar to ConsumeTraces.

func (ConsumeTracesFunc) ConsumeTraces

func (f ConsumeTracesFunc) ConsumeTraces(ctx context.Context, ld pdata.Traces) error

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.

Jump to

Keyboard shortcuts

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