Home Download Docs Code Community
import "perkeep.org/pkg/blobserver/gethandler"
Overview
Index

Overview ▾

Package gethandler implements the HTTP handler for fetching blobs.

Index

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

get.go

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)
Website layout inspired by memcached.
Content by the authors.