s3

package
v1.29.1 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithEndpoint

func WithEndpoint(endpoint string) containers.Option[Source]

WithEndpoint configures the region for s3

func WithPollInterval

func WithPollInterval(tick time.Duration) containers.Option[Source]

WithPollInterval configures the interval in which we will restore the s3 fs.

func WithPrefix added in v1.25.0

func WithPrefix(prefix string) containers.Option[Source]

WithPrefix configures the prefix for s3

func WithRegion

func WithRegion(region string) containers.Option[Source]

WithRegion configures the region for s3

Types

type Source

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

Source represents an implementation of an fs.FSSource This implementation is backed by an S3 bucket

func NewSource

func NewSource(logger *zap.Logger, bucket string, opts ...containers.Option[Source]) (*Source, error)

NewSource constructs a Source.

func (*Source) Get

func (s *Source) Get() (fs.FS, error)

Get returns an fs.FS for the local filesystem.

func (*Source) String

func (s *Source) String() string

String returns an identifier string for the store type.

func (*Source) Subscribe

func (s *Source) Subscribe(ctx context.Context, ch chan<- fs.FS)

Subscribe feeds local fs.FS implementations onto the provided channel. It blocks until the provided context is cancelled.

Jump to

Keyboard shortcuts

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