tcp

package
v0.75.4 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 20 Imported by: 3

Documentation

Overview

Package tcp provides TCP connection management for log clients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConnectivityDiagnose added in v0.63.0

func CheckConnectivityDiagnose(endpoint config.Endpoint, timeoutSeconds int) (url string, err error)

CheckConnectivityDiagnose is a diagnosis for TCP connections

Types

type ConnectionManager

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

A ConnectionManager manages connections

func NewConnectionManager

func NewConnectionManager(endpoint config.Endpoint, status statusinterface.Status) *ConnectionManager

NewConnectionManager returns an initialized ConnectionManager

func (*ConnectionManager) CloseConnection

func (cm *ConnectionManager) CloseConnection(conn net.Conn)

CloseConnection closes a connection on the client side

func (*ConnectionManager) NewConnection

func (cm *ConnectionManager) NewConnection(ctx context.Context) (net.Conn, error)

NewConnection returns an initialized connection to the intake. It blocks until a connection is available

func (*ConnectionManager) ShouldReset

func (cm *ConnectionManager) ShouldReset(connCreationTime time.Time) bool

ShouldReset returns whether the connection should be reset, depending on the endpoint's config and the passed connection creation time.

type Delimiter

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

Delimiter is responsible for adding delimiters to the frames being sent.

func NewDelimiter

func NewDelimiter(useProto bool) Delimiter

NewDelimiter returns a delimiter.

type Destination

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

Destination is responsible for shipping logs to a remote server over TCP.

func NewDestination

func NewDestination(endpoint config.Endpoint, useProto bool, destinationsContext *client.DestinationsContext, shouldRetry bool, status statusinterface.Status) *Destination

NewDestination returns a new destination.

func (*Destination) IsMRF added in v0.54.0

func (d *Destination) IsMRF() bool

IsMRF indicates that this destination is a Multi-Region Failover destination.

func (*Destination) Metadata added in v0.61.0

func (d *Destination) Metadata() *client.DestinationMetadata

Metadata is not supported for TCP destinations

func (*Destination) Start

func (d *Destination) Start(input chan *message.Payload, output chan *message.Payload, isRetrying chan bool) (stopChan <-chan struct{})

Start reads from the input, transforms a message into a frame and sends it to a remote server,

func (*Destination) Target

func (d *Destination) Target() string

Target is the address of the destination.

Jump to

Keyboard shortcuts

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