kinesisstream

package
v6.27.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DBName is the name of the ark db. Either specify this or StreamName.
	DBName string
	// Environment is the name of the environment to point to. Default is _DEPLOY_ENV.
	Environment string
	// StreamName is the name of the Kinesis stream to send to. Either specify this or DBName.
	StreamName string
	// Region is the region where this is running. Defaults to _POD_REGION.
	Region string
	// KinesisPutRecordBatchMaxRecords overrides the default value (500) for the maximum number of records to send in a batch.
	KinesisPutRecordBatchMaxRecords int
	// KinesisPutRecordBatchMaxBytes overrides the default value (5000000) for the maximum number of bytes to send in as batch.
	KinesisPutRecordBatchMaxBytes int
	// KinesisPutRecordBatchMaxTime overrides the default value (10 minutes) for the maximum amount of time between writing an event and sending to the stream.
	KinesisPutRecordBatchMaxTime time.Duration
	// KinesisAPI defaults to an API object configured with Region, but can be overriden here.
	KinesisAPI kinesisiface.KinesisAPI
	// ErrLogger is a logger used to make sure errors from goroutines still get surfaced. Defaults to basic logger.Logger
	ErrLogger logger.KayveeLogger
}

Config configures things related to collecting analytics.

type Logger

type Logger struct {
	logger.KayveeLogger
	// contains filtered or unexported fields
}

Logger writes to Kinesis.

func New

func New(c Config) (*Logger, error)

New returns a logger that writes to an analytics ark db. It takes as input the db name and the ark db config file.

func (*Logger) Close

func (ksl *Logger) Close() error

Close flushes all logs to Kinesis.

func (*Logger) Write

func (ksl *Logger) Write(bs []byte) (int, error)

Write a log.

type RequestErrorClassifier

type RequestErrorClassifier struct{}

RequestErrorClassifier corrects for AWS SDK's lack of automatic retry on "RequestError: connection reset by peer"

func (RequestErrorClassifier) Classify

Classify the error.

Jump to

Keyboard shortcuts

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