http

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: 14 Imported by: 3

Documentation

Index

Constants

View Source
const (
	TextContentType = "text/plain"
	JSONContentType = "application/json"
)

ContentType options,

Variables

This section is empty.

Functions

func CheckConnectivity

func CheckConnectivity(endpoint config.Endpoint) config.HTTPConnectivity

CheckConnectivity check if sending logs through HTTP works

Types

type ContentEncoding

type ContentEncoding interface {
	// contains filtered or unexported methods
}

ContentEncoding encodes the payload

var IdentityContentType ContentEncoding = &identityContentType{}

IdentityContentType encodes the payload using the identity function

type Destination

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

Destination sends a payload over HTTP.

func NewDestination

func NewDestination(endpoint config.Endpoint, contentType string, destinationsContext *client.DestinationsContext) *Destination

NewDestination returns a new Destination. TODO: add support for SOCKS5

func (*Destination) Send

func (d *Destination) Send(payload []byte) error

Send sends a payload over HTTP, the error returned can be retryable and it is the responsibility of the callee to retry.

func (*Destination) SendAsync

func (d *Destination) SendAsync(payload []byte)

SendAsync sends a payload in background.

type GzipContentEncoding

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

GzipContentEncoding encodes the payload using gzip algorithm

func NewGzipContentEncoding

func NewGzipContentEncoding(level int) *GzipContentEncoding

NewGzipContentEncoding creates a new Gzip content type

Jump to

Keyboard shortcuts

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