s3

package
v0.0.0-...-f7843b9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package s3 containers the OutputPlugin which sends log records to S3

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OutputPlugin

type OutputPlugin struct {
	PluginID int
	// contains filtered or unexported fields
}

OutputPlugin sends log records to s3

func NewOutputPlugin

func NewOutputPlugin(region, bucket, prefix string, gzip bool, pluginID int) (*OutputPlugin, error)

NewOutputPlugin creates a OutputPlugin object

func (*OutputPlugin) AddRecord

func (output *OutputPlugin) AddRecord(record map[interface{}]interface{}, fluentTag string, timestamp time.Time) int

AddRecord accepts a record and adds it to the buffer, flushing the buffer if it is full the return value is one of: FLB_OK FLB_RETRY API Errors lead to an FLB_RETRY, and all other errors are logged, the record is discarded and FLB_OK is returned

func (*OutputPlugin) Flush

func (output *OutputPlugin) Flush(fluentTag string) error

Flush sends the current buffer of records

Jump to

Keyboard shortcuts

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