client

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	Send(payload []byte) error
	SendAsync(payload []byte)
}

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 ConnectionManager

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