s3

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StaticBucketDir  = "static_buckets"
	DynamicBucketDir = "dynamic_buckets"
)

Variables

View Source
var (
	ErrCreateOutputPluginCantCheckBucket = errors.New("could not check bucket")
	ErrCreateOutputPluginNoSuchBucket    = errors.New("bucket doesn't exist")
)

Functions

func Factory

func Factory() (pipeline.AnyPlugin, pipeline.AnyConfig)

Types

type Config

type Config struct {
	// > @3@4@5@6
	// > Under the hood this plugin uses /plugin/output/file/ to collect logs
	FileConfig file.Config `json:"file_config" child:"true"` // *

	// > @3@4@5@6
	// > Compression type
	CompressionType string `json:"compression_type" default:"zip" options:"zip"` // *

	// > @3@4@5@6
	// > Endpoint address of default bucket.
	Endpoint string `json:"endpoint" required:"true"` // *
	// > @3@4@5@6
	// > s3 access key.
	AccessKey string `json:"access_key" required:"true"` // *
	// > @3@4@5@6
	// > s3 secret key.
	SecretKey string `json:"secret_key" required:"true"` // *
	// > @3@4@5@6
	// >  s3 default bucket.
	DefaultBucket string `json:"bucket" required:"true"` // *
	// > @3@4@5@6
	// > MultiBuckets is additional buckets, which can also receive event.
	// > Event must contain `bucket_name` field which value is s3 bucket name.
	// > Events without `bucket_name` sends to DefaultBucket.
	MultiBuckets `json:"multi_buckets" required:"false"` // *
	// > @3@4@5@6
	// > s3 connection secure option.
	Secure bool `json:"secure" default:"false"` // *
	// > @3@4@5@6
	// > BucketEventField field change destination bucket of event to fields value.
	// > Fallback to DefaultBucket if BucketEventField bucket doesn't exist.
	BucketEventField string `json:"bucket_field_event" default:""` // *
	// > @3@4@5@6
	// > DynamicBucketsLimit regulates how many buckets can be created dynamically.
	// > Prevents problems when some random strings in BucketEventField where
	DynamicBucketsLimit int `json:"dynamic_buckets_limit" default:"32"` // *
}

! config-params ^ config-params

func (*Config) IsMultiBucketExists

func (c *Config) IsMultiBucketExists(bucketName string) bool

type MultiBuckets

type MultiBuckets []singleBucketConfig

type ObjectStoreClient

type ObjectStoreClient interface {
	MakeBucket(bucketName string, location string) (err error)
	BucketExists(bucketName string) (bool, error)
	FPutObject(bucketName, objectName, filePath string, opts minio.PutObjectOptions) (n int64, err error)
}

type ObjectStoreClientLimiter

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

func NewObjectStoreClientLimiter

func NewObjectStoreClientLimiter(limit int) *ObjectStoreClientLimiter

func (*ObjectStoreClientLimiter) CanCreate

func (limiter *ObjectStoreClientLimiter) CanCreate() bool

func (*ObjectStoreClientLimiter) Increment

func (limiter *ObjectStoreClientLimiter) Increment()

type Plugin

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

func (*Plugin) Out

func (p *Plugin) Out(event *pipeline.Event)

func (*Plugin) Start

func (p *Plugin) Start(config pipeline.AnyConfig, params *pipeline.OutputPluginParams)

func (*Plugin) StartWithMinio

func (p *Plugin) StartWithMinio(config pipeline.AnyConfig, params *pipeline.OutputPluginParams, factory objStoreFactory)

func (*Plugin) Stop

func (p *Plugin) Stop()

Directories

Path Synopsis
Package mock_s3 is a generated GoMock package.
Package mock_s3 is a generated GoMock package.

Jump to

Keyboard shortcuts

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