consumer

package
v0.61.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 785

Documentation

Overview

Package consumer contains interfaces that receive and process consumerdata.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capabilities added in v0.27.0

type Capabilities struct {
	// MutatesData is set to true if Consume* function of the
	// processor modifies the input TraceData or MetricsData argument.
	// Processors which modify the input data MUST set this flag to true. If the processor
	// does not modify the data it MUST set this flag to false. If the processor creates
	// a copy of the data before modifying then this flag can be safely set to false.
	MutatesData bool
}

Capabilities describes the capabilities of a Processor.

type ConsumeLogsFunc added in v0.47.0

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

ConsumeLogsFunc is a helper function that is similar to ConsumeLogs.

func (ConsumeLogsFunc) ConsumeLogs added in v0.47.0

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

ConsumeLogs calls f(ctx, ld).

type ConsumeMetricsFunc added in v0.47.0

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

ConsumeMetricsFunc is a helper function that is similar to ConsumeMetrics.

func (ConsumeMetricsFunc) ConsumeMetrics added in v0.47.0

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

ConsumeMetrics calls f(ctx, ld).

type ConsumeTracesFunc added in v0.47.0

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

ConsumeTracesFunc is a helper function that is similar to ConsumeTraces.

func (ConsumeTracesFunc) ConsumeTraces added in v0.47.0

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

ConsumeTraces calls f(ctx, ld).

type Logs added in v0.23.0

type Logs interface {

	// ConsumeLogs receives plog.Logs for consumption.
	ConsumeLogs(ctx context.Context, ld plog.Logs) error
	// contains filtered or unexported methods
}

Logs is an interface that receives plog.Logs, processes it as needed, and sends it to the next processing node if any or to the destination.

func NewLogs added in v0.47.0

func NewLogs(consume ConsumeLogsFunc, options ...Option) (Logs, error)

NewLogs returns a Logs configured with the provided options.

type Metrics added in v0.23.0

type Metrics interface {

	// ConsumeMetrics receives pmetric.Metrics for consumption.
	ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error
	// contains filtered or unexported methods
}

Metrics is the new metrics consumer interface that receives pmetric.Metrics, processes it as needed, and sends it to the next processing node if any or to the destination.

func NewMetrics added in v0.47.0

func NewMetrics(consume ConsumeMetricsFunc, options ...Option) (Metrics, error)

NewMetrics returns a Metrics configured with the provided options.

type Option added in v0.47.0

type Option func(*baseImpl)

Option to construct new consumers.

func WithCapabilities added in v0.47.0

func WithCapabilities(capabilities Capabilities) Option

WithCapabilities overrides the default GetCapabilities function for a processor. The default GetCapabilities function returns mutable capabilities.

type Traces added in v0.23.0

type Traces interface {

	// ConsumeTraces receives ptrace.Traces for consumption.
	ConsumeTraces(ctx context.Context, td ptrace.Traces) error
	// contains filtered or unexported methods
}

Traces is an interface that receives ptrace.Traces, processes it as needed, and sends it to the next processing node if any or to the destination.

func NewTraces added in v0.47.0

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

NewTraces returns a Traces configured with the provided options.

Directories

Path Synopsis
Package consumererror provides wrappers to easily classify errors.
Package consumererror provides wrappers to easily classify errors.
Package consumertest defines types and functions used to help test packages implementing the consumer package interfaces.
Package consumertest defines types and functions used to help test packages implementing the consumer package interfaces.
xconsumer module

Jump to

Keyboard shortcuts

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