s3

package
v0.0.0-...-3511abf Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetS3BucketRegion

func GetS3BucketRegion(ctx context.Context, bucket string) (string, error)

GetS3BucketRegion returns the region name of the specified bucket. It does so by making an API call to AWS.

Types

type S3Downloader

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

S3Downloader implements downloading a checkpoint from S3 and sends it to the client in an archive file.

func NewS3Downloader

func NewS3Downloader(aw archive.ArchiveWriter, bucket string, prefix string) *S3Downloader

NewS3Downloader returns a new S3Downloader.

func (*S3Downloader) Close

func (d *S3Downloader) Close() error

Close closes the underlying ArchiveWriter.

func (*S3Downloader) Download

func (d *S3Downloader) Download(ctx context.Context) error

Download downloads the checkpoint.

Jump to

Keyboard shortcuts

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