Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionManager ¶
type ConnectionManager struct {
// contains filtered or unexported fields
}
A ConnectionManager manages connections
func NewConnectionManager ¶
func NewConnectionManager(endpoint logsconfig.Endpoint) *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 ¶
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 logsconfig 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.
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 logsconfig.Endpoint, useProto bool, destinationsContext *client.DestinationsContext) *Destination
NewDestination returns a new destination.
func (*Destination) Send ¶
func (d *Destination) Send(payload []byte) error
Send transforms a message into a frame and sends it to a remote server, returns an error if the operation failed.
func (*Destination) SendAsync ¶
func (d *Destination) SendAsync(payload []byte)
SendAsync sends a message to the destination without blocking. If the channel is full, the incoming messages will be dropped