proxy

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const RegistryProxyPrefix = "/registryproxy"

RegistryProxyPrefix is the prefix of url on UI.

Variables

View Source
var NotaryEndpoint = config.InternalNotaryEndpoint()

NotaryEndpoint , exported for testing.

Proxy is the instance of the reverse proxy in this package.

Functions

func Handle

func Handle(rw http.ResponseWriter, req *http.Request)

Handle handles the request.

func Init

func Init(urls ...string) error

Init initialize the Proxy instance and handler chain.

func MatchListRepos

func MatchListRepos(req *http.Request) bool

MatchListRepos checks if the request looks like a request to list repositories.

func MatchPullManifest

func MatchPullManifest(req *http.Request) (bool, string, string)

MatchPullManifest checks if the request looks like a request to pull manifest. If it is returns the image and tag/sha256 digest as 2nd and 3rd return values

Types

type JSONError

type JSONError struct {
	Code    string `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
	Detail  string `json:"detail,omitempty"`
}

JSONError wraps a concrete Code and Message, it's readable for docker deamon.

Jump to

Keyboard shortcuts

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