lazyconsumer

package
v0.36.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package lazyconsumer implements a lazy OpenTelemetry Collector consumer which can lazily forward request to another consumer implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

Consumer is a lazily-loaded consumer.

func New

func New(ctx context.Context) *Consumer

New creates a new Consumer. The provided ctx is used to determine when the Consumer should stop accepting data; if the ctx is closed, no further data will be accepted.

func (*Consumer) Capabilities

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

Capabilities implements otelconsumer.baseConsumer.

func (*Consumer) ConsumeLogs

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

ConsumeLogs implements otelconsumer.Logs.

func (*Consumer) ConsumeMetrics

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

ConsumeMetrics implements otelconsumer.Metrics.

func (*Consumer) ConsumeTraces

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

ConsumeTraces implements otelconsumer.Traces.

func (*Consumer) SetConsumers

SetConsumers updates the internal consumers that Consumer will forward data to. It is valid for any combination of m, l, and t to be nil.

Jump to

Keyboard shortcuts

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