s3

package
v0.750.9-dryrun Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: Apache-2.0 Imports: 11 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, endpointURL *string) (string, error)

GetS3BucketRegion returns the region name of the specified bucket. It does so by making an API call to either the provided endpoint or 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(
	ctx context.Context,
	aw archive.ArchiveWriter,
	bucket string,
	prefix string,
	endpointURL *string,
) (*S3Downloader, error)

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.

func (*S3Downloader) ListFiles

func (d *S3Downloader) ListFiles(ctx context.Context) ([]archive.FileEntry, error)

ListFiles lists the files in the checkpoint.

Jump to

Keyboard shortcuts

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