proxy

package
v1.8.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotaryEndpoint = ""

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

func MatchPushManifest added in v1.8.0

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

MatchPushManifest checks if the request looks like a request to push 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