gcs

package
v0.750.8 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultDownloadPartSize = units.MiB * 5

DefaultDownloadPartSize is the default part size for downloading files from GCS. This is the same as the default part size for S3.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCSDownloader

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

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

func NewGCSDownloader

func NewGCSDownloader(
	ctx context.Context,
	aw archive.ArchiveWriter,
	bucket string,
	prefix string,
) (*GCSDownloader, error)

NewGCSDownloader returns a new GCSDownloader.

func (*GCSDownloader) Close

func (d *GCSDownloader) Close() error

Close closes the underlying ArchiveWriter.

func (*GCSDownloader) Download

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

Download downloads the checkpoint.

func (*GCSDownloader) ListFiles

func (d *GCSDownloader) 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