engine

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckpointPath

func CheckpointPath(sourcePath, guid string) (string, error)

CheckpointPath returns the on-disk path for an upload checkpoint.

func Download added in v0.3.6

func Download(ctx context.Context, source transfer.ReadBackend, guid, dstPath string, opts DownloadOptions) error

func OptimalChunkSize

func OptimalChunkSize(fileSize int64) int64

OptimalChunkSize returns a recommended chunk size for the given file size.

Types

type DownloadOptions added in v0.3.6

type DownloadOptions struct {
	MultipartThreshold   int64
	ChunkSize            int64
	Concurrency          int
	RetryStrategy        transfer.RetryStrategy
	EphemeralDestination bool
}

type GenericUploader

type GenericUploader struct {
	Backend transfer.MultipartBackend
}

func (*GenericUploader) AbortMultipart added in v0.3.8

func (u *GenericUploader) AbortMultipart(ctx context.Context, sourcePath, guid string) error

func (*GenericUploader) Upload

func (*GenericUploader) UploadWithLocation added in v0.3.8

func (u *GenericUploader) UploadWithLocation(ctx context.Context, req transfer.TransferRequest) (string, error)

UploadWithLocation returns the completed multipart target when the backend supplies it.

Jump to

Keyboard shortcuts

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