gcs

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: 7 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(aw archive.ArchiveWriter, bucket string, prefix string) *GCSDownloader

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.

Jump to

Keyboard shortcuts

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