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

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

get.go

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