Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Downloader ¶ added in v0.0.30
type Downloader interface {
GetObject(ctx context.Context, input *s3.GetObjectInput, opts ...func(*s3.Options)) (*s3.GetObjectOutput, error)
}
Downloader abstracts S3 GetObject for streaming reads. Unlike TransferClient (which writes to io.WriterAt), Downloader returns a streaming io.ReadCloser body suitable for gzip decompression.
func DefaultDownloaderFactory ¶ added in v0.0.30
func DefaultDownloaderFactory(ctx context.Context, region string) (Downloader, error)
DefaultDownloaderFactory creates a real S3 client for streaming downloads.
type DownloaderFactory ¶ added in v0.0.30
type DownloaderFactory func(ctx context.Context, region string) (Downloader, error)
DownloaderFactory builds a Downloader for a given region.
type ObjectLister ¶ added in v0.0.27
type ObjectLister interface {
ListObjectsV2(ctx context.Context, input *s3.ListObjectsV2Input, opts ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)
}
ObjectLister abstracts S3 ListObjectsV2 for snapshot discovery.
func DefaultObjectListerFactory ¶ added in v0.0.27
func DefaultObjectListerFactory(ctx context.Context, region string) (ObjectLister, error)
DefaultObjectListerFactory creates a real S3 client for listing objects.
type ObjectListerFactory ¶ added in v0.0.27
type ObjectListerFactory func(ctx context.Context, region string) (ObjectLister, error)
ObjectListerFactory builds an ObjectLister for a given region.
type TransferClient ¶
type TransferClient interface {
DownloadObject(ctx context.Context, input *transfermanager.DownloadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.DownloadObjectOutput, error)
}
TransferClient abstracts S3 downloads. DownloadObject uses the transfer manager's io.WriterAt path for parallel byte-range downloads.
func DefaultTransferClientFactory ¶
func DefaultTransferClientFactory(ctx context.Context, region string) (TransferClient, error)
DefaultTransferClientFactory creates a transfer manager backed by a real S3 service client.
type TransferClientFactory ¶
type TransferClientFactory func(ctx context.Context, region string) (TransferClient, error)
TransferClientFactory builds a TransferClient for a given region.
type Uploader ¶
type Uploader interface {
UploadObject(ctx context.Context, input *transfermanager.UploadObjectInput, opts ...func(*transfermanager.Options)) (*transfermanager.UploadObjectOutput, error)
}
Uploader abstracts the transfermanager upload call for testing.
type UploaderFactory ¶
UploaderFactory builds an Uploader for a given region.
type WriteAtBuffer ¶
type WriteAtBuffer struct {
// contains filtered or unexported fields
}
WriteAtBuffer is a goroutine-safe in-memory io.WriterAt, used for downloading small S3 objects (e.g. latest.txt) via DownloadObject.
func (*WriteAtBuffer) Bytes ¶
func (w *WriteAtBuffer) Bytes() []byte