70ab06b864
This change updates the backend storage package that consumes StorageDriver to use the new Stat call, over CurrentSize. It also makes minor updates for using WriteStream and ReadStream.
31 lines
507 B
Go
31 lines
507 B
Go
package storage
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/docker/docker-registry/digest"
|
|
)
|
|
|
|
// layerReadSeeker implements Layer and provides facilities for reading and
|
|
// seeking.
|
|
type layerReader struct {
|
|
fileReader
|
|
|
|
name string // repo name of this layer
|
|
digest digest.Digest
|
|
}
|
|
|
|
var _ Layer = &layerReader{}
|
|
|
|
func (lrs *layerReader) Name() string {
|
|
return lrs.name
|
|
}
|
|
|
|
func (lrs *layerReader) Digest() digest.Digest {
|
|
return lrs.digest
|
|
}
|
|
|
|
func (lrs *layerReader) CreatedAt() time.Time {
|
|
return lrs.modtime
|
|
}
|