fetcher

package
v0.0.0-...-90b93ca Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3

type S3 struct {
	//Access key falls back to env AWS_ACCESS_KEY, then metadata
	Access string
	//Secret key falls back to env AWS_SECRET_ACCESS_KEY, then metadata
	Secret string
	//Region defaults to ap-southeast-2
	Region string
	Bucket string
	Key    string
	//Interval between checks
	Interval time.Duration
	//HeadTimeout defaults to 5 seconds
	HeadTimeout time.Duration
	//GetTimeout defaults to 5 minutes
	GetTimeout time.Duration
	// contains filtered or unexported fields
}

S3 uses authenticated HEAD requests to poll the status of a given object. If it detects this file has been updated, it will perform an object GET and return its io.Reader stream.

func (*S3) Fetch

func (s *S3) Fetch() (io.Reader, error)

Fetch the binary from S3

func (*S3) Init

func (s *S3) Init() error

Init validates the provided config

Jump to

Keyboard shortcuts

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