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 MaxCommits = 1000
MaxCommits is the most commits an upload file holds.
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. Commits are the commits the file held, in its order, which Ingest leaves for the caller to put together.
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. The commits the file holds, at most MaxCommits, are not stored but answered in Ingested.Commits. 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.