s3

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: MIT Imports: 18 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 {
	AwsKeyId    string `yaml:"aws_key_id"`
	AwsSecKey   string `yaml:"aws_sec_key"`
	AwsS3Bucket string `yaml:"aws_s3_bucket"`
	AwsS3Region string `yaml:"aws_s3_region"`

	LocalPath       string `yaml:"local_path"`
	Path            string `yaml:"s3_path"`
	TimeSliceFormat string `yaml:"time_slice_format"`
	AwsS3OutputKey  string `yaml:"aws_s3_output_key"`
}

type FileSaver

type FileSaver struct {
	Config      Config
	Writer      *gzip.Writer
	FileInfo    OutputFileInfo
	RateCounter *ratecounter.RateCounter
}

func (*FileSaver) WriteToFile

func (fileSaver *FileSaver) WriteToFile(event *buffer.Event) error

type OutputFileInfo

type OutputFileInfo struct {
	Filename string
	Count    int
}

type S3Writer

type S3Writer struct {
	Config     Config
	Sender     buffer.Sender
	S3Uploader *s3manager.Uploader
	// contains filtered or unexported fields
}

func (*S3Writer) Init

func (s3Writer *S3Writer) Init(config yaml.MapSlice, sender buffer.Sender) error

func (*S3Writer) InitiateUploadToS3

func (s3Writer *S3Writer) InitiateUploadToS3(fileSaver *FileSaver)

func (*S3Writer) Start

func (s3Writer *S3Writer) Start() error

func (*S3Writer) Stop

func (s *S3Writer) Stop() error

func (*S3Writer) ValidateConfig added in v0.0.2

func (s3Writer *S3Writer) ValidateConfig(config *Config) error

func (*S3Writer) WaitForUpload

func (s3Writer *S3Writer) WaitForUpload()

Jump to

Keyboard shortcuts

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