storage

package
v0.0.0-...-49098ed Latest Latest
Warning

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

Go to latest
Published: May 25, 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 CloudwatchState

type CloudwatchState struct {
	LogGroupName      string
	LogStream         *LogStream
	CloudwatchLogsSvc *cloudwatchlogs.CloudWatchLogs
	MaxBufferSize     int
	BufferTimeLimit   int
	MaxBufferEntries  int
}

func (*CloudwatchState) Flush

func (c *CloudwatchState) Flush()

func (*CloudwatchState) GetName

func (c *CloudwatchState) GetName() string

func (*CloudwatchState) Initialize

func (c *CloudwatchState) Initialize()

func (*CloudwatchState) Store

func (c *CloudwatchState) Store(flow *flowstore.Flow)

type LogStream

type LogStream struct {
	LogStreamName     string
	LogGroupName      string
	LastSequenceToken *string
	// contains filtered or unexported fields
}

func (*LogStream) IngestEvent

func (l *LogStream) IngestEvent(flow *flowstore.Flow)

func (*LogStream) UploadBufferedEvents

func (l *LogStream) UploadBufferedEvents()

type S3State

type S3State struct {
	S3Client      *s3.Client
	ActiveObject  *s3Object
	BucketName    string
	MaxObjectSize int
}

func (*S3State) Flush

func (s *S3State) Flush()

func (*S3State) GetName

func (s *S3State) GetName() string

func (*S3State) Initialize

func (s *S3State) Initialize()

func (*S3State) Store

func (s *S3State) Store(flow *flowstore.Flow)

Store ingests a flow into the buffer and uploads it to S3 when the size/time threshold is met

type StorageBackend

type StorageBackend interface {
	Store(flow *flowstore.Flow)
	GetName() string
	Flush()
}

type StorageManager

type StorageManager struct {
	InputChannel    chan *flowstore.Flow
	StopChannel     chan bool
	StorageBackends []StorageBackend
	Stopped         chan bool
}

func NewStorageManager

func NewStorageManager(input chan *flowstore.Flow, backends []StorageBackend) StorageManager

func (*StorageManager) Start

func (sm *StorageManager) Start()

func (*StorageManager) Stop

func (sm *StorageManager) Stop()

Jump to

Keyboard shortcuts

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