s3

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultArguments = Arguments{
	PollFrequency: 10 * time.Minute,
}

DefaultArguments sets the poll frequency

Functions

This section is empty.

Types

type Arguments

type Arguments struct {
	Path string `river:"path,attr"`
	// PollFrequency determines the frequency to check for changes
	// defaults to 10m.
	PollFrequency time.Duration `river:"poll_frequency,attr,optional"`
	// IsSecret determines if the content should be displayed to the user.
	IsSecret bool `river:"is_secret,attr,optional"`
	// Options allows the overriding of default settings.
	Options ClientOptions `river:"client_options,block,optional"`
}

Arguments implements the input for the S3 component.

func (*Arguments) UnmarshalRiver

func (a *Arguments) UnmarshalRiver(f func(v interface{}) error) error

UnmarshalRiver implements the unmarshaller

type ClientOptions

type ClientOptions struct {
	AccessKey    string            `river:"key,attr,optional"`
	Secret       rivertypes.Secret `river:"secret,attr,optional"`
	Endpoint     string            `river:"endpoint,attr,optional"`
	DisableSSL   bool              `river:"disable_ssl,attr,optional"`
	UsePathStyle bool              `river:"use_path_style,attr,optional"`
	Region       string            `river:"region,attr,optional"`
}

ClientOptions implements specific AWS configuration options

type Exports

type Exports struct {
	Content rivertypes.OptionalSecret `river:"content,attr"`
}

Exports implements the file content

type S3

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

S3 handles reading content from a file located in an S3-compatible system.

func New

func New(o component.Options, args Arguments) (*S3, error)

New initializes the S3 component.

func (*S3) CurrentHealth

func (s *S3) CurrentHealth() component.Health

CurrentHealth returns the health of the component.

func (*S3) Run

func (s *S3) Run(ctx context.Context) error

Run activates the content handler and watcher.

func (*S3) Update

func (s *S3) Update(args component.Arguments) error

Update is called whenever the arguments have changed.

Jump to

Keyboard shortcuts

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