connector

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	MaxConcurrentRequests() uint
	Credentials() auth.RegistryCredentials
	AllowInsecure() bool
	UserAgent() string
}

type Connector

type Connector interface {
	Request(method string, url *url.URL, headers map[string]string, hint string) (*http.Response, error)
	Delete(url *url.URL, headers map[string]string, hint string) (*http.Response, error)
	Get(url *url.URL, headers map[string]string, hint string) (*http.Response, error)
	GetStatistics() Statistics
}

func NewBasicAuthConnector

func NewBasicAuthConnector(cfg Config) Connector

func NewTokenAuthConnector

func NewTokenAuthConnector(cfg Config) Connector

type Statistics

type Statistics interface {
	Requests() uint
	TokenCacheHitsAtApiLevel() uint
	TokenCacheMissesAtApiLevel() uint
	TokenCacheFailsAtApiLevel() uint
	TokenCacheHitsAtAuthLevel() uint
	TokenCacheMissesAtAuthLevel() uint
	TokenCacheFailsAtAuthLevel() uint
}

Jump to

Keyboard shortcuts

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