destinations

package
v1.16.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// The timestamp layout used in the S3 object key filename part with second precision: yyyyMMddTHHmmssZ
	S3ObjectTimestampLayout = "20060102T150405Z"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	SendEvents(parsedEventChannel chan *parsers.Result, errChan chan error)
}

Destination defines the interface that all Destinations should follow

func CreateS3Destination added in v1.2.0

func CreateS3Destination(jsonAPI jsoniter.API) Destination

type S3Destination

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

S3Destination sends normalized events to S3

func (*S3Destination) SendEvents

func (d *S3Destination) SendEvents(parsedEventChannel chan *parsers.Result, errChan chan error)

SendEvents stores events in S3. It continuously reads events from parsedEventChannel, groups them in batches per log type and stores them in the appropriate S3 path. If the method encounters an error it writes an error to the errorChannel and continues until channel is closed (skipping events). The sendData() method is called as go routine to allow processing to continue and hide network latency.

Jump to

Keyboard shortcuts

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