gethandler

package
v0.0.0-...-4ba1123 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package gethandler implements the HTTP handler for fetching blobs.

Index

Constants

View Source
const (
	HTTP_CACHE_DURATION = 10 * 356 * 24 * time.Hour
)

Variables

This section is empty.

Functions

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.

Types

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL