storageio

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Overview

Package storageio owns bounded transfer and hostile-reader handling for storage adapters. Publication and cleanup remain the adapter's responsibility.

Index

Constants

View Source
const BufferBytes = 32 << 10

Variables

This section is empty.

Functions

func Copy

func Copy(ctx context.Context, dst io.Writer, source io.Reader, maximum int64) (size int64, digest storage.SHA256, err error)

Copy reads at most maximum+1 source bytes and never writes beyond the bound. It does not close either stream or use ReaderFrom/WriterTo fast paths that could evade its limits. EOF after bytes is valid; a non-EOF error with bytes is fatal.

Types

This section is empty.

Jump to

Keyboard shortcuts

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