registry

package
v0.0.0-...-5860612 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2021 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// LoginServer is the registry login server name, such as myregistry.azurecr.io
	LoginServer string

	// DataEndpoint is the registry data endpoint, such as myregistry.southindia.azurecr.io
	DataEndpoint string

	// Username is the registry login username
	Username string

	// Password is the registry login password
	Password string

	// Insecure indicates if registry should be accessed over HTTP
	Insecure bool

	// BasicAuthMode indicates that only basic auth should be used
	BasicAuthMode bool
}

Options configures the proxy.

type Proxy

type Proxy struct {
	rhttp.RoundTripper
	*Options
	zerolog.Logger
}

Proxy acts as a proxy to a remote registry.

func NewProxy

func NewProxy(tripper http.RoundTripper, opts *Options, logger zerolog.Logger) (*Proxy, error)

NewProxy creates a new registry proxy.

func (Proxy) CheckHealth

func (p Proxy) CheckHealth() error

CheckHealth checks the health of core registry APIs.

func (Proxy) CheckReferrers

func (p Proxy) CheckReferrers(count int) error

CheckReferrers checks the registry's referrer APIs.

func (Proxy) Ping

func (p Proxy) Ping() (err error)

Ping pings various registry endpoints with different auth modes.

Jump to

Keyboard shortcuts

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