common

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxRetries     = 20 // setting Max Retries to a higher number - we'd like to retry VERY hard before failing.
	EventDelimiter = '\n'
)
View Source
const (
	OpLogNamespace  = "log_analysis"
	OpLogComponent  = "log_processor"
	OpLogServiceDim = "service"
)

labels for oplog

Variables

View Source
var (
	// Session and clients that can be used by components of the log processor
	Session      *session.Session
	LambdaClient lambdaiface.LambdaAPI
	S3Uploader   s3manageriface.UploaderAPI
	SqsClient    sqsiface.SQSAPI
	SnsClient    snsiface.SNSAPI

	Config EnvConfig
)
View Source
var (
	OpLogManager = oplog.NewManager(OpLogNamespace, OpLogComponent)

	OpLogLambdaServiceDim    = zap.String(OpLogServiceDim, "lambda")
	OpLogS3ServiceDim        = zap.String(OpLogServiceDim, "s3")
	OpLogSNSServiceDim       = zap.String(OpLogServiceDim, "sns")
	OpLogProcessorServiceDim = zap.String(OpLogServiceDim, "processor")
	OpLogGlueServiceDim      = zap.String(OpLogServiceDim, "glue")
)

Functions

func Setup added in v1.2.0

func Setup()

Types

type DataStream

type DataStream struct {
	Reader io.Reader
	Hints  DataStreamHints
	// The log type if known
	// If it is nil, it means the log type hasn't been identified yet
	LogType *string
}

DataStream represents a data stream that read by the processor

type DataStreamHints

type DataStreamHints struct {
	S3 *S3DataStreamHints // if nil, no hint
}

Used in a DataStream as meta data to describe the data

type EnvConfig added in v1.2.0

type EnvConfig struct {
	AwsLambdaFunctionMemorySize int    `required:"true" split_words:"true"`
	ProcessedDataBucket         string `required:"true" split_words:"true"`
	SqsQueueURL                 string `required:"true" split_words:"true"`
	SnsTopicARN                 string `required:"true" split_words:"true"`
}

type S3DataStreamHints

type S3DataStreamHints struct {
	Bucket      string
	Key         string
	ContentType string
}

Used in a DataStreamHints as meta data to describe the S3 object backing the stream

Directories

Path Synopsis
Package null provides performant nullable values for JSON serialization/deserialization
Package null provides performant nullable values for JSON serialization/deserialization
Package strictnull provides types for lossless handling of nullable JSON values.
Package strictnull provides types for lossless handling of nullable JSON values.

Jump to

Keyboard shortcuts

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