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.
Click to show internal directories.
Click to hide internal directories.