integration

package
v3.28.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata struct {
	Name    string
	Version string
}

Metadata contains the integration name and version that is passed down to the integration SDK.

type OptionFunc

type OptionFunc func(i *Wrapper) error

OptionFunc is an option func for the Wrapper.

func WithHTTPSink added in v3.1.0

func WithHTTPSink(sinkConfig config.HTTPSink) OptionFunc

WithHTTPSink configures the wrapper to use an HTTP Sink for metrics. If this option is not specified, Wrapper will configure the integration.Integration to sink metrics to stdout.

func WithLogger

func WithLogger(logger *log.Logger) OptionFunc

func WithMetadata

func WithMetadata(metadata Metadata) OptionFunc

WithMetadata allows to configure the integration name and version that is passed down to the integration SDK.

type Wrapper

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

Wrapper is a wrapper on top of the SDK integration.

func NewWrapper

func NewWrapper(opts ...OptionFunc) (*Wrapper, error)

NewWrapper creates a new SDK integration wrapper using the specified options.

func (*Wrapper) Integration

func (iw *Wrapper) Integration() (*sdk.Integration, error)

Integration returns a sdk.Integration, configured to output data to the specified agent. Integration will block and wait until the specified server is ready, up to a maximum timeout.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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