Documentation
¶
Overview ¶
Package upload is the upload file: objects a client sends a store in one piece, each after the ones among them it references. A Writer writes one, a Reader reads it back, and Ingest stores what it holds.
Index ¶
Constants ¶
const MaxObject = 32 << 20
MaxObject is the largest object an upload file holds.
Variables ¶
var ErrInvalid = errors.New("invalid upload file")
ErrInvalid is an upload file that can't be read.
Functions ¶
This section is empty.
Types ¶
type Ingested ¶
Ingested is what Ingest did: the objects the file held, and how many of them the store didn't hold already. Commit is the commit the file held, which Ingest leaves for the caller to put.
func Ingest ¶
Ingest stores the objects of the upload file r in b, a batch at a time, skipping those b holds already, so ingesting a file twice stores it once. It asks b about at most 4,096 refs at once. A commit the file holds, at most one, is not stored but answered in Ingested.Commit. It reports its progress as progress.OpIngest, bytes counting the file's bytes against size.
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads an upload file.