Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// Mount is where the workspace mounts. An absolute symlink that points below it, outside every root, would
// break in another workspace.
Mount string
Roots []string
Limits Limits
// Workers read files at once. Zero is 8.
Workers int
// BatchObjects is the most objects of one put. Zero is 4096.
BatchObjects int
}
type Result ¶
type Store ¶
type Store interface {
Has(ctx context.Context, shas []gitpack.SHA) ([]bool, error)
PutObjects(ctx context.Context, objs []gitpack.Object) error
PutBlob(ctx context.Context, sha gitpack.SHA, size int64, r io.Reader) error
}
Store is the part of the object store that a pack needs. A PutObjects call that fails may have stored a prefix of its objects, because an adapter splits a batch into requests, and each request stores all its objects or none. A pack puts every blob before any tree, and every tree after the trees below it, in that order within a call, so any prefix that the store holds is closed: a tree that the store holds never names a missing object. PutBlob can return before it stops reading r, so the caller never uses r again after a failure.