s3

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Up contains the systems availability. If true there are no issues with s3.
	Up bool

	// Health contains the system's readiness. If false the watcher
	// could not list objects. There are still probably objects in the kv
	// store so the service is still considered "Up".
	Health bool

	// Config exports the config struct. Need to make export
	// the config struct itself (TODO).
	Config config
)

Functions

func Poll

func Poll(bucket, bucketRegion string, v SecretHandlerVersion, log *zap.Logger)

Poll polls every 60 seconds, kicking off an S3 sync.

func Sync

func Sync(t time.Time, log *zap.Logger)

Sync is the main function for the s3 watcher. It sets up the AWS session, lists all items in the bucket, finally parsing all files and putting them in the kv store.

Types

type S3API added in v0.8.3

type S3API interface {
	s3iface.S3API
}

S3API is a local wrapper over aws-sdk-go's S3 API

type SecretHandlerVersion added in v0.8.3

type SecretHandlerVersion int

SecretHandlerVersion is a type indicating which version of secret handler we should use

const (
	// V0 is iota
	V0 SecretHandlerVersion = iota
	// V1 is the v1 version enum-ish value of secret injection
	V1
	// V2 is the v2 version enum-ish value of secret injection
	V2
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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