sink

package
v3.13.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultAgentForwarderhost holds the default endpoint of the agent forwarder.
	DefaultAgentForwarderhost = "localhost"
	DefaultAgentForwarderPath = "/v1/data"
)

Variables

View Source
var ErrCAAppend = errors.New("appending certs to pool")

Functions

func NewTLSClient added in v3.2.0

func NewTLSClient(conf config.TLSConfig) (*http.Client, error)

Types

type Doer

type Doer interface {
	Do(req *http.Request) (*http.Response, error)
}

Doer is the interface that HTTPSink client should satisfy.

type HTTPSink

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

HTTPSink holds the configuration of the HTTP sink used by the integration.

func New

func New(options HTTPSinkOptions) (*HTTPSink, error)

New initialize HTTPSink struct.

func (HTTPSink) Write

func (h HTTPSink) Write(p []byte) (n int, err error)

Write is the function signature needed by the infrastructure SDK package.

type HTTPSinkOptions

type HTTPSinkOptions struct {
	URL    string
	Client Doer
}

HTTPSinkOptions holds the configuration of the HTTP sink used by the integration.

Jump to

Keyboard shortcuts

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