s3

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: MIT Imports: 15 Imported by: 0

README

Amazon S3 sink, Minio, Digital Ocean Spaces

This sink implements Amazon S3 protocol and can be enabled for Digital Ocean Spaces and Minio using a custom endpoint.

This sink can be enabled by adding the following configuration in the tables section:

tables:
  eventlog:
    compact:                               # enable compaction
      interval: 60                         # compact every 60 seconds
      nameFunc: "s3://bucket/namefunc.lua" # file name function
      s3:                                  # sink to Amazon S3
        region: "ap-southeast-1"           # the region to use
        bucket: "bucket"                   # the bucket to use
        prefix: "dir1/"                    # (optional) prefix to add
        endpoint: "http://127.0.0.1"       # (optional) custom endpoint to use
        sse: ""                            # (optional) server-side encryption
        accessKey: ""                      # (optional) static access key to override
        secretKey: ""                      # (optional) static secret key to override
        concurrency: 32                    # (optional) upload concurrency, default=NUM_CPU
...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploader

type Uploader interface {
	Upload(input *s3manager.UploadInput, options ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
}

Uploader uploads to underlying backend

type Writer

type Writer struct {
	*base.Writer
	// contains filtered or unexported fields
}

Writer represents a writer for Amazon S3 and compatible storages.

func New

func New(monitor monitor.Monitor, bucket, prefix, region, endpoint, sse, access, secret, filter, encoding string, concurrency int) (*Writer, error)

New initializes a new S3 writer.

func (*Writer) Write

func (w *Writer) Write(key key.Key, blocks []block.Block) error

Write writes creates object of S3 bucket prefix key in S3Writer bucket with value val

Jump to

Keyboard shortcuts

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