fakeconsumer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	CapabilitiesFunc   func() otelconsumer.Capabilities
	ConsumeTracesFunc  func(context.Context, ptrace.Traces) error
	ConsumeMetricsFunc func(context.Context, pmetric.Metrics) error
	ConsumeLogsFunc    func(context.Context, plog.Logs) error
}

Consumer is a fake otelcol.Consumer implementation which invokes functions when methods are called. All struct member fields are optional. If a struct member field is not provided, implementations of methods will default to a no-op.

func (*Consumer) Capabilities

func (c *Consumer) Capabilities() otelconsumer.Capabilities

Capabilities implements otelcol.Consumer. If the CapabilitiesFunc is not provided, MutatesData is reported as true.

func (*Consumer) ConsumeLogs

func (c *Consumer) ConsumeLogs(ctx context.Context, md plog.Logs) error

ConsumeLogs implements otelcol.ConsumeLogs.

func (*Consumer) ConsumeMetrics

func (c *Consumer) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error

ConsumeMetrics implements otelcol.ConsumeMetrics.

func (*Consumer) ConsumeTraces

func (c *Consumer) ConsumeTraces(ctx context.Context, td ptrace.Traces) error

ConsumeTraces implements otelcol.ConsumeTraces.

Jump to

Keyboard shortcuts

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