Makes LayerUpload an io.ReaderFrom

This allows wrappers of LayerUpload to implement io.ReadFrom, which
prevents io.Copy on LayerUpload implementations from using repeated 32kB
Writes.

This has a huge performance implication, especially for s3/azure storage
drivers.
This commit is contained in:
Brian Bland 2015-02-05 17:37:52 -08:00
parent 9b9ea55797
commit 0bc84606cc

View file

@ -33,6 +33,7 @@ type Layer interface {
// LayerService.Resume.
type LayerUpload interface {
io.WriteSeeker
io.ReaderFrom
io.Closer
// Name of the repository under which the layer will be linked.