Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destination ¶
Destination sends a payload to a specific endpoint over a given network protocol.
type Destinations ¶
type Destinations struct { Main Destination Additionals []Destination }
Destinations holds the main destination and additional ones to send logs to.
func NewDestinations ¶
func NewDestinations(main Destination, additionals []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.