testcomponents

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ExampleConnectorFactory = connector.NewFactory(
	connType,
	createExampleConnectorDefaultConfig,

	connector.WithTracesToTraces(createExampleTracesToTraces, component.StabilityLevelDevelopment),
	connector.WithTracesToMetrics(createExampleTracesToMetrics, component.StabilityLevelDevelopment),
	connector.WithTracesToLogs(createExampleTracesToLogs, component.StabilityLevelDevelopment),

	connector.WithMetricsToTraces(createExampleMetricsToTraces, component.StabilityLevelDevelopment),
	connector.WithMetricsToMetrics(createExampleMetricsToMetrics, component.StabilityLevelDevelopment),
	connector.WithMetricsToLogs(createExampleMetricsToLogs, component.StabilityLevelDevelopment),

	connector.WithLogsToTraces(createExampleLogsToTraces, component.StabilityLevelDevelopment),
	connector.WithLogsToMetrics(createExampleLogsToMetrics, component.StabilityLevelDevelopment),
	connector.WithLogsToLogs(createExampleLogsToLogs, component.StabilityLevelDevelopment),
)

ExampleConnectorFactory is factory for ExampleConnector.

View Source
var ExampleExporterFactory = exporter.NewFactory(
	typeStr,
	createExporterDefaultConfig,
	exporter.WithTraces(createTracesExporter, stability),
	exporter.WithMetrics(createMetricsExporter, stability),
	exporter.WithLogs(createLogsExporter, stability),
)

ExampleExporterFactory is factory for ExampleExporter.

View Source
var ExampleProcessorFactory = processor.NewFactory(
	procType,
	createDefaultConfig,
	processor.WithTraces(createTracesProcessor, component.StabilityLevelDevelopment),
	processor.WithMetrics(createMetricsProcessor, component.StabilityLevelDevelopment),
	processor.WithLogs(createLogsProcessor, component.StabilityLevelDevelopment))

ExampleProcessorFactory is factory for ExampleProcessor.

View Source
var ExampleReceiverFactory = receiver.NewFactory(
	receiverType,
	createReceiverDefaultConfig,
	receiver.WithTraces(createTracesReceiver, component.StabilityLevelDevelopment),
	receiver.WithMetrics(createMetricsReceiver, component.StabilityLevelDevelopment),
	receiver.WithLogs(createLogsReceiver, component.StabilityLevelDevelopment))

ExampleReceiverFactory is factory for ExampleReceiver.

View Source
var ExampleRouterFactory = connector.NewFactory(
	routerType,
	createExampleRouterDefaultConfig,
	connector.WithTracesToTraces(createExampleTracesRouter, component.StabilityLevelDevelopment),
	connector.WithMetricsToMetrics(createExampleMetricsRouter, component.StabilityLevelDevelopment),
	connector.WithLogsToLogs(createExampleLogsRouter, component.StabilityLevelDevelopment),
)

ExampleRouterFactory is factory for ExampleRouter.

Functions

This section is empty.

Types

type ExampleConnector added in v0.68.0

type ExampleConnector struct {
	consumer.ConsumeTracesFunc
	consumer.ConsumeMetricsFunc
	consumer.ConsumeLogsFunc
	// contains filtered or unexported fields
}

func (*ExampleConnector) Capabilities added in v0.68.0

func (c *ExampleConnector) Capabilities() consumer.Capabilities

func (*ExampleConnector) Shutdown added in v0.68.0

func (cs *ExampleConnector) Shutdown(_ context.Context) error

func (*ExampleConnector) Start added in v0.68.0

func (cs *ExampleConnector) Start(_ context.Context, _ component.Host) error

func (*ExampleConnector) Started added in v0.68.0

func (cs *ExampleConnector) Started() bool

func (*ExampleConnector) Stopped added in v0.68.0

func (cs *ExampleConnector) Stopped() bool

type ExampleExporter

type ExampleExporter struct {
	Traces  []ptrace.Traces
	Metrics []pmetric.Metrics
	Logs    []plog.Logs
	// contains filtered or unexported fields
}

ExampleExporter stores consumed traces and metrics for testing purposes.

func (*ExampleExporter) Capabilities

func (exp *ExampleExporter) Capabilities() consumer.Capabilities

func (*ExampleExporter) ConsumeLogs

func (exp *ExampleExporter) ConsumeLogs(_ context.Context, ld plog.Logs) error

ConsumeLogs receives plog.Logs for processing by the Logs.

func (*ExampleExporter) ConsumeMetrics

func (exp *ExampleExporter) ConsumeMetrics(_ context.Context, md pmetric.Metrics) error

ConsumeMetrics receives pmetric.Metrics for processing by the Metrics.

func (*ExampleExporter) ConsumeTraces

func (exp *ExampleExporter) ConsumeTraces(_ context.Context, td ptrace.Traces) error

ConsumeTraces receives ptrace.Traces for processing by the consumer.Traces.

func (*ExampleExporter) Shutdown

func (cs *ExampleExporter) Shutdown(_ context.Context) error

func (*ExampleExporter) Start

func (cs *ExampleExporter) Start(_ context.Context, _ component.Host) error

func (*ExampleExporter) Started

func (cs *ExampleExporter) Started() bool

func (*ExampleExporter) Stopped

func (cs *ExampleExporter) Stopped() bool

type ExampleProcessor

type ExampleProcessor struct {
	consumer.ConsumeTracesFunc
	consumer.ConsumeMetricsFunc
	consumer.ConsumeLogsFunc
	// contains filtered or unexported fields
}

func (*ExampleProcessor) Capabilities

func (ep *ExampleProcessor) Capabilities() consumer.Capabilities

func (*ExampleProcessor) Shutdown

func (cs *ExampleProcessor) Shutdown(_ context.Context) error

func (*ExampleProcessor) Start

func (cs *ExampleProcessor) Start(_ context.Context, _ component.Host) error

func (*ExampleProcessor) Started

func (cs *ExampleProcessor) Started() bool

func (*ExampleProcessor) Stopped

func (cs *ExampleProcessor) Stopped() bool

type ExampleReceiver

type ExampleReceiver struct {
	consumer.ConsumeTracesFunc
	consumer.ConsumeMetricsFunc
	consumer.ConsumeLogsFunc
	// contains filtered or unexported fields
}

ExampleReceiver allows producing traces and metrics for testing purposes.

func (*ExampleReceiver) Shutdown

func (cs *ExampleReceiver) Shutdown(_ context.Context) error

func (*ExampleReceiver) Start

func (cs *ExampleReceiver) Start(_ context.Context, _ component.Host) error

func (*ExampleReceiver) Started

func (cs *ExampleReceiver) Started() bool

func (*ExampleReceiver) Stopped

func (cs *ExampleReceiver) Stopped() bool

type ExampleRouter added in v0.73.0

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

func (*ExampleRouter) Capabilities added in v0.73.0

func (r *ExampleRouter) Capabilities() consumer.Capabilities

func (*ExampleRouter) ConsumeLogs added in v0.73.0

func (r *ExampleRouter) ConsumeLogs(ctx context.Context, ld plog.Logs) error

func (*ExampleRouter) ConsumeMetrics added in v0.73.0

func (r *ExampleRouter) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error

func (*ExampleRouter) ConsumeTraces added in v0.73.0

func (r *ExampleRouter) ConsumeTraces(ctx context.Context, td ptrace.Traces) error

func (*ExampleRouter) Shutdown added in v0.73.0

func (cs *ExampleRouter) Shutdown(_ context.Context) error

func (*ExampleRouter) Start added in v0.73.0

func (cs *ExampleRouter) Start(_ context.Context, _ component.Host) error

func (*ExampleRouter) Started added in v0.73.0

func (cs *ExampleRouter) Started() bool

func (*ExampleRouter) Stopped added in v0.73.0

func (cs *ExampleRouter) Stopped() bool

type ExampleRouterConfig added in v0.73.0

type ExampleRouterConfig struct {
	Traces  *LeftRightConfig `mapstructure:"traces"`
	Metrics *LeftRightConfig `mapstructure:"metrics"`
	Logs    *LeftRightConfig `mapstructure:"logs"`
}

type LeftRightConfig added in v0.73.0

type LeftRightConfig struct {
	Left  component.ID `mapstructure:"left"`
	Right component.ID `mapstructure:"right"`
}

Jump to

Keyboard shortcuts

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