s3

package
v0.0.0-...-424d171 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package s3 implements the output of logs to an AWS s3 bucket

For configuration, "type", "bucket", "region", and "prefix" are all required.

"delimiter" is optional and controls the character written between log entries, by default "/n"

output:
  type: aws:s3
  bucket: "bucket_name"
  region: "us-west"
  delimiter: "/n"
  prefix: "my_name"  ;; my_name_0123456789_001.gz

Assumptions:

- Either aws credentials file or environment variables (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY) are set.

- Credentials have rights to put an S3 object into the bucket.

Index

Constants

View Source
const Name = "s3"

Name is the name used in the configuration file and the registry.

Variables

This section is empty.

Functions

func New

func New(cfg *ucfg.Config) (s output.Output, err error)

New is factory for creating a new S3Output

Types

type S3Output

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

S3Output holds config for writing to S3.

func (*S3Output) Close

func (s *S3Output) Close() error

Close closes internal buffer and uploads data to S3

func (*S3Output) NewInterval

func (s *S3Output) NewInterval() error

func (*S3Output) Write

func (s *S3Output) Write(b []byte) (n int, err error)

Write writes log entry to internal buffer

Jump to

Keyboard shortcuts

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