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
Click to show internal directories.
Click to hide internal directories.