uploader

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Uploader

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

Uploader uses go routines to upload files in parallel with a limit of 20 concurrent uploads. It is provided a list of URLs to upload and a channel to receive the results. The results are sent to the channel as a map of URL to error. If an error occurs, the error is sent to the channel and the upload is stopped. The uploader will continue to upload files until the channel is closed. The uploader will return when all uploads are complete or when an error occurs.

func NewUploader

func NewUploader(ctx context.Context, filePath string, uploadInstructs []client.CacheUploadInstruction, limit int) *Uploader

func (*Uploader) Upload

func (u *Uploader) Upload(ctx context.Context) ([]client.CachePartETag, error)

Jump to

Keyboard shortcuts

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