Documentation ¶
Index ¶
- func CreateMirror(unpacker unpackFn) rio.MirrorFunc
- func CreateScanner(t api.PackType, unpacker unpackFn) rio.ScanFunc
- func CreateUnpack(t api.PackType, unpacker unpackFn) rio.UnpackFunc
- func OpenWriteController(warehouseAddr api.WarehouseLocation, packType api.PackType, mon rio.Monitor) (wc warehouse.BlobstoreWriteController, err error)
- func PickReader(wareID api.WareID, warehouses []api.WarehouseLocation, requireMono bool, ...) (_ io.ReadCloser, err error)
- type HashingReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateMirror ¶
func CreateMirror(unpacker unpackFn) rio.MirrorFunc
CreateMirror provides basic mirroring logic used by both the tar and zip transmat implementations.
func CreateUnpack ¶
func CreateUnpack(t api.PackType, unpacker unpackFn) rio.UnpackFunc
CreateUnpack generates a standard rio.UnpackFunc shared by both zip and tar transmat implementations. The basic wrapper caches unpacking, validates types, and manages warehouse behavior.
func OpenWriteController ¶
func OpenWriteController( warehouseAddr api.WarehouseLocation, packType api.PackType, mon rio.Monitor, ) (wc warehouse.BlobstoreWriteController, err error)
func PickReader ¶
func PickReader( wareID api.WareID, warehouses []api.WarehouseLocation, requireMono bool, mon rio.Monitor, ) (_ io.ReadCloser, err error)
Pick a warehouse.
With K/V warehouses, this takes the form of "pick the first one that answers".
Types ¶
type HashingReader ¶
Proxies a reader, hashing the stream as it's read. (This is useful if using `io.Copy` to move bytes from a reader to a writer, and you want to use that goroutine to power the hashing as well but replacing the writer with a multiwriter is out of bounds.)
Click to show internal directories.
Click to hide internal directories.