s3uploader

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetS3BucketRegion = getBucketRegion

GetS3BucketRegion is used for unit testing

Functions

This section is empty.

Types

type S3Input

type S3Input struct {
	Config         config.S3UploaderConfig
	UploadInterval time.Duration
}

type S3UploadProcess

type S3UploadProcess struct {
	// contains filtered or unexported fields
}

func NewS3UploadProcess

func NewS3UploadProcess(input S3Input, clusterUUID string) (*S3UploadProcess, error)

func (*S3UploadProcess) CacheRecord

func (p *S3UploadProcess) CacheRecord(record ipfixentities.Record)

func (*S3UploadProcess) GetBucketName

func (p *S3UploadProcess) GetBucketName() string

func (*S3UploadProcess) GetBucketPrefix

func (p *S3UploadProcess) GetBucketPrefix() string

func (*S3UploadProcess) GetRegion

func (p *S3UploadProcess) GetRegion() string

func (*S3UploadProcess) GetUploadInterval

func (p *S3UploadProcess) GetUploadInterval() time.Duration

func (*S3UploadProcess) SetUploadInterval

func (p *S3UploadProcess) SetUploadInterval(uploadInterval time.Duration)

func (*S3UploadProcess) Start

func (p *S3UploadProcess) Start()

func (*S3UploadProcess) Stop

func (p *S3UploadProcess) Stop()

func (*S3UploadProcess) UpdateS3Uploader

func (p *S3UploadProcess) UpdateS3Uploader(bucketName, bucketPrefix, region string) error

type S3Uploader

type S3Uploader struct{}

func (*S3Uploader) Upload

func (u *S3Uploader) Upload(ctx context.Context, input *s3.PutObjectInput, awsS3Uploader *s3manager.Uploader, opts ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)

type S3UploaderAPI

type S3UploaderAPI interface {
	Upload(ctx context.Context, input *s3.PutObjectInput, awsS3Uploader *s3manager.Uploader, opts ...func(*s3manager.Uploader)) (
		*s3manager.UploadOutput, error,
	)
}

Define a wrapper interface S3UploaderAPI to assist unit testing.

Directories

Path Synopsis
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

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