handler

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugInfo

func DebugInfo(w http.ResponseWriter, req *http.Request)

DebugInfo responds the inner http server running information.

func GetArgs

func GetArgs(w http.ResponseWriter, r *http.Request)

GetArgs returns all the arguments of command-line except the program name.

func GetEnv

func GetEnv(w http.ResponseWriter, r *http.Request)

GetEnv returns the environments of dfdaemon

func Proxy added in v0.3.0

func Proxy(w http.ResponseWriter, r *http.Request)

Proxy makes the dfdaemon as a reverse proxy to download image layers by dragonfly

Types

type DFRoundTripper

type DFRoundTripper struct {
	Round  *http.Transport
	Round2 http.RoundTripper

	Downloader downloader.Interface
}

DFRoundTripper implements RoundTripper for dfget. It uses http.fileTransport to serve requests that need to use dfget, and uses http.Transport to serve the other requests.

func NewDFRoundTripper added in v0.3.0

func NewDFRoundTripper(cfg *tls.Config) *DFRoundTripper

NewDFRoundTripper return the default DFRoundTripper.

func (*DFRoundTripper) RoundTrip

func (roundTripper *DFRoundTripper) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip only process first redirect at present fix resource release

Jump to

Keyboard shortcuts

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