storagetransfer

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package storagetransfer provides HTTP streaming of vdisk files and subvolumes to/from presigned S3 URLs. It is used to move a deployment's persistent bytes (zmount disks and VM rootfs layers) between nodes during a contract move. The helpers are shared by both the storage and storage_light modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DownloadDir

func DownloadDir(dir, url string) error

DownloadDir GETs url and extracts the tar stream into `dir`.

func DownloadToFile

func DownloadToFile(path, url string) error

DownloadToFile GETs url and writes the body into an existing file, truncating it.

func UploadDir

func UploadDir(dir, url string) error

UploadDir streams a tar of `dir` to url. It uses two passes so it needs no temp file (nodes run from a small tmpfs): pass 1 tars to a byte counter to get the exact Content-Length (presigned PUT rejects chunked encoding), pass 2 tars straight into the request body via an io.Pipe. The source is a paused VM's rootfs, so it is static between the two passes.

func UploadFile

func UploadFile(path, url string) error

UploadFile PUTs a seekable file so net/http sets a definite Content-Length (presigned S3/MinIO PUT rejects chunked transfer encoding).

Types

This section is empty.

Jump to

Keyboard shortcuts

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