Overview ▹
Overview ▾
Package gethandler implements the HTTP handler for fetching blobs.
Index
- Constants
- func CreateGetHandler(fetcher blob.Fetcher) http.Handler
- func ServeBlobRef(rw http.ResponseWriter, req *http.Request, blobRef blob.Ref, fetcher blob.Fetcher)
- type Handler
- func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)
Package files
Constants
const ( HTTP_CACHE_DURATION = 10 * 356 * 24 * time.Hour )
func CreateGetHandler
func CreateGetHandler(fetcher blob.Fetcher) http.Handler
CreateGetHandler returns an http Handler for serving blobs from fetcher.
func ServeBlobRef
func ServeBlobRef(rw http.ResponseWriter, req *http.Request, blobRef blob.Ref, fetcher blob.Fetcher)
ServeBlobRef serves a blob.
type Handler
type Handler struct { Fetcher blob.Fetcher }
Handler is the HTTP handler for serving GET requests of blobs.
func (*Handler) ServeHTTP
func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)