multipart

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2024 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package multipart implements generic multipart uploading.

Index

Constants

View Source
const (
	BufferSize = 1024 * 1024 // BufferSize is the default size of the pages used in the reader

)

Variables

This section is empty.

Functions

func NewRW

func NewRW() *pool.RW

NewRW gets a pool.RW using the multipart pool

func UploadMultipart

func UploadMultipart(ctx context.Context, src fs.ObjectInfo, in io.Reader, opt UploadMultipartOptions) (chunkWriterOut fs.ChunkWriter, err error)

UploadMultipart does a generic multipart upload from src using f as OpenChunkWriter.

in is read seqentially and chunks from it are uploaded in parallel.

It returns the chunkWriter used in case the caller needs to extract any private info from it.

Types

type UploadMultipartOptions

type UploadMultipartOptions struct {
	Open        fs.OpenChunkWriter // thing to call OpenChunkWriter on
	OpenOptions []fs.OpenOption    // options for OpenChunkWriter
}

UploadMultipartOptions options for the generic multipart upload

Jump to

Keyboard shortcuts

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