kinesis

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Overview

Package kinesis contains the OutputPlugin which sends log records to Kinesis Stream

Index

Constants

View Source
const (
	// CompressionNone disables compression
	CompressionNone CompressionType = "none"
	// CompressionZlib enables zlib compression
	CompressionZlib = "zlib"
	// CompressionGzip enables gzip compression
	CompressionGzip = "gzip"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CompressionType added in v1.6.0

type CompressionType string

CompressionType indicates the type of compression to apply to each record

type CompressorFunc added in v1.8.1

type CompressorFunc func([]byte) ([]byte, error)

CompressorFunc is a function that compresses a byte slice

type OutputPlugin

type OutputPlugin struct {
	PluginID int

	Concurrency int
	// contains filtered or unexported fields
}

OutputPlugin sends log records to kinesis

func NewOutputPlugin

func NewOutputPlugin(region, stream, dataKeys, partitionKey, roleARN, kinesisEndpoint, stsEndpoint, timeKey, timeFmt, logKey, replaceDots string, concurrency, retryLimit int, isAggregate, appendNewline bool, compression CompressionType, pluginID int, httpRequestTimeout time.Duration) (*OutputPlugin, error)

NewOutputPlugin creates an OutputPlugin object

func (*OutputPlugin) AddRecord

func (outputPlugin *OutputPlugin) AddRecord(records *[]*kinesis.PutRecordsRequestEntry, record map[interface{}]interface{}, timeStamp *time.Time) int

AddRecord accepts a record and adds it to the buffer the return value is one of: FLB_OK FLB_RETRY FLB_ERROR

func (*OutputPlugin) Flush

func (outputPlugin *OutputPlugin) Flush(records *[]*kinesis.PutRecordsRequestEntry) int

Flush sends the current buffer of log records Returns FLB_OK, FLB_RETRY, FLB_ERROR

func (*OutputPlugin) FlushAggregatedRecords added in v1.6.0

func (outputPlugin *OutputPlugin) FlushAggregatedRecords(records *[]*kinesis.PutRecordsRequestEntry) int

FlushAggregatedRecords must be called after Returns FLB_OK, FLB_RETRY, FLB_ERROR

func (*OutputPlugin) FlushConcurrent added in v1.3.0

func (outputPlugin *OutputPlugin) FlushConcurrent(count int, records []*kinesis.PutRecordsRequestEntry) int

FlushConcurrent sends the current buffer of log records in a goroutine with retries Returns FLB_OK, FLB_RETRY Will return FLB_RETRY if the limit of concurrency has been reached

func (*OutputPlugin) FlushWithRetries added in v1.3.0

func (outputPlugin *OutputPlugin) FlushWithRetries(count int, records []*kinesis.PutRecordsRequestEntry)

FlushWithRetries sends the current buffer of log records, with retries

func (*OutputPlugin) IsAggregate added in v1.6.0

func (outputPlugin *OutputPlugin) IsAggregate() bool

IsAggregate indicates if this instance of the plugin has KCL aggregation enabled.

type PutRecordsClient

type PutRecordsClient interface {
	PutRecords(input *kinesis.PutRecordsInput) (*kinesis.PutRecordsOutput, error)
}

PutRecordsClient contains the kinesis PutRecords method call

Directories

Path Synopsis
Package mock_kinesis is a generated GoMock package.
Package mock_kinesis is a generated GoMock package.

Jump to

Keyboard shortcuts

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