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 Multi-Region Failover mode IsMRF() bool // Destination target (e.g. https://agent-intake.logs.datadoghq.com) Target() string // Metadata returns the metadata of the destination Metadata() *DestinationMetadata // 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 DestinationMetadata ¶ added in v0.61.0
type DestinationMetadata struct { ReportingEnabled bool // contains filtered or unexported fields }
DestinationMetadata contains metadata about a destination
func NewDestinationMetadata ¶ added in v0.61.0
func NewDestinationMetadata(componentName, instanceID, kind, endpointId string) *DestinationMetadata
NewDestinationMetadata returns a new DestinationMetadata
func NewNoopDestinationMetadata ¶ added in v0.61.0
func NewNoopDestinationMetadata() *DestinationMetadata
NewNoopDestinationMetadata returns a new DestinationMetadata with reporting disabled
func (*DestinationMetadata) MonitorTag ¶ added in v0.61.0
func (d *DestinationMetadata) MonitorTag() string
MonitorTag returns the monitor tag for the destination
func (*DestinationMetadata) TelemetryName ¶ added in v0.61.0
func (d *DestinationMetadata) TelemetryName() string
TelemetryName returns the telemetry name for the destination
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.