Refactoring cloudfactory layer handler into a more generic storage
middleware concept. This also breaks the dependency the storage package had on goamz Signed-off-by: David Lawrence <david.lawrence@docker.com> (github: endophage)
This commit is contained in:
parent
0c130dff5b
commit
4acda57e05
12 changed files with 160 additions and 294 deletions
|
@ -2,6 +2,7 @@ package distribution
|
|||
|
||||
import (
|
||||
"io"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/docker/distribution/digest"
|
||||
|
@ -106,6 +107,11 @@ type Layer interface {
|
|||
|
||||
// CreatedAt returns the time this layer was created.
|
||||
CreatedAt() time.Time
|
||||
|
||||
// ServeHTTP allows a layer to serve itself, whether by providing
|
||||
// a redirect directly to the content, or by serving the content
|
||||
// itself
|
||||
ServeHTTP(w http.ResponseWriter, r *http.Request)
|
||||
}
|
||||
|
||||
// LayerUpload provides a handle for working with in-progress uploads.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue