chunking

package
v3.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 7 Imported by: 1 module, 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsChunked

func IsChunked(fn string) (bool, error)

IsChunked checks if a given path refers to a chunk or not.

Types

type ChunkBLOBInfo

type ChunkBLOBInfo struct {
	Path         string
	TransferID   string
	TotalChunks  int
	CurrentChunk int
}

ChunkBLOBInfo stores info about a particular chunk.

func GetChunkBLOBInfo

func GetChunkBLOBInfo(path string) (*ChunkBLOBInfo, error)

GetChunkBLOBInfo decodes a chunk name to retrieve info about it.

type ChunkHandler

type ChunkHandler struct {
	ChunkFolder string `mapstructure:"chunk_folder"`
}

ChunkHandler manages chunked uploads, storing the chunks in a temporary directory until it gets the final chunk which is then returned.

func NewChunkHandler

func NewChunkHandler(chunkFolder string) *ChunkHandler

NewChunkHandler creates a handler for chunked uploads.

func (*ChunkHandler) WriteChunk

func (c *ChunkHandler) WriteChunk(fn string, r io.ReadCloser) (string, string, error)

WriteChunk saves an intermediate chunk temporarily and assembles all chunks once the final one is received.

Jump to

Keyboard shortcuts

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