xprocessorhelper

package module
v0.130.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2025 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProfiles

func NewProfiles(
	_ context.Context,
	_ processor.Settings,
	_ component.Config,
	nextConsumer xconsumer.Profiles,
	profilesFunc ProcessProfilesFunc,
	options ...Option,
) (xprocessor.Profiles, error)

NewProfiles creates a xprocessor.Profiles that ensure context propagation.

Types

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option apply changes to internalOptions.

func WithCapabilities

func WithCapabilities(capabilities consumer.Capabilities) Option

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

func WithShutdown

func WithShutdown(shutdown component.ShutdownFunc) Option

WithShutdown overrides the default Shutdown function for an processor. The default shutdown function does nothing and always returns nil.

func WithStart

func WithStart(start component.StartFunc) Option

WithStart overrides the default Start function for an processor. The default shutdown function does nothing and always returns nil.

type ProcessProfilesFunc

type ProcessProfilesFunc func(context.Context, pprofile.Profiles) (pprofile.Profiles, error)

ProcessProfilesFunc is a helper function that processes the incoming data and returns the data to be sent to the next component. If error is returned then returned data are ignored. It MUST not call the next component.

Jump to

Keyboard shortcuts

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