multipart

package
v1.66.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 11 Imported by: 6

Documentation

Overview

Package multipart implements generic multipart uploading.

Index

Constants

This section is empty.

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