storage

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProcessedMetadataValue = "processed"
)

Variables

This section is empty.

Functions

func FilterAndExplain

func FilterAndExplain(filterName string, files []string, filter Filter) (filtered []string, err error)

func GetUserAgent

func GetUserAgent() string

GetUserAgent gets a de-facto standardish user agent string. It includes, OS, ARCH, build date and git commit hash. It uses "Elastic/GCSBeat" as the software identifier.

Types

type Filter

type Filter func(filename string) (shouldFilter bool, err error)

func InvertFilter

func InvertFilter(filter Filter) Filter

type StorageProvider

type StorageProvider interface {
	ListUnprocessed() (files []string, err error)
	Read(path string) (reader io.ReadCloser, err error)
	Remove(path string) error
	WasProcessed(path string) (bool, error)
	MarkProcessed(path string) error
}

func NewStorageProvider

func NewStorageProvider(cfg *config.Config) (StorageProvider, error)

Jump to

Keyboard shortcuts

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