client

package module
v0.54.0-devel Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	// Whether or not destination is used for High Availability mode
	IsHA() bool

	// Destination target (e.g. https://agent-intake.logs.datadoghq.com)
	Target() string

	// Start starts the destination send loop. close the intput to stop listening for payloads. stopChan is
	// signaled when the destination has fully shutdown and all buffered payloads have been flushed. isRetrying is
	// signaled when the retry state changes. isRetrying can be nil if you don't need to handle retries.
	Start(input chan *message.Payload, output chan *message.Payload, isRetrying chan bool) (stopChan <-chan struct{})
}

Destination sends a payload to a specific endpoint over a given network protocol.

type Destinations

type Destinations struct {
	Reliable   []Destination
	Unreliable []Destination
}

Destinations encapsulates a set of log destinations, distinguishing reliable vs unreliable destinations

func NewDestinations

func NewDestinations(reliable []Destination, unreliable []Destination) *Destinations

NewDestinations returns a new destinations composite.

type DestinationsContext

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

A DestinationsContext manages senders and allows us to "unclog" the pipeline when trying to stop it and failing to send messages.

func NewDestinationsContext

func NewDestinationsContext() *DestinationsContext

NewDestinationsContext returns an initialized DestinationsContext

func (*DestinationsContext) Context

func (dc *DestinationsContext) Context() context.Context

Context allows one to access the current context of this DestinationsContext.

func (*DestinationsContext) Start

func (dc *DestinationsContext) Start()

Start creates a context that will be cancelled on Stop()

func (*DestinationsContext) Stop

func (dc *DestinationsContext) Stop()

Stop cancels the context that should be used by all senders.

type RetryableError

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

RetryableError represents an error that can occur when sending a payload.

func NewRetryableError

func NewRetryableError(err error) *RetryableError

NewRetryableError returns a new destination error.

func (*RetryableError) Error

func (e *RetryableError) Error() string

RetryableError returns the message of the error.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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