registryclient

package
v1.8.1-rc.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultClient, _ = InitClient()

DefaultClient is default registry client.

Functions

func BuildRemoteOption added in v1.8.0

func BuildRemoteOption(c Client) remote.Option

BuildRemoteOption builds remote.Option based on client.

Types

type Client added in v1.8.0

type Client interface {
	// Keychain provides keychain object.
	Keychain() authn.Keychain

	// Transport provides transport object.
	Transport() *http.Transport

	// FetchImageDescriptor fetches Descriptor from registry with given imageRef
	// and provides access to metadata about remote artifact.
	FetchImageDescriptor(imageRef string) (*gcrremote.Descriptor, error)

	// UseLocalKeychain updates keychain with the default local keychain.
	UseLocalKeychain()

	// RefreshKeychainPullSecrets loads fresh data from pull secrets and updates Keychain.
	// If pull secrets are empty - returns.
	RefreshKeychainPullSecrets() error
}

Client provides registry related objects.

func InitClient added in v1.8.0

func InitClient(options ...Option) (Client, error)

InitClient initialize registry client with given options.

type Option added in v1.8.0

type Option func(*client) error

Option is an option to initialize registry client.

func WithAllowInsecureRegistry added in v1.8.0

func WithAllowInsecureRegistry() Option

WithKeychainPullSecrets provides initialize registry client option that allows to use insecure registries.

func WithKeychainPullSecrets added in v1.8.0

func WithKeychainPullSecrets(kubClient kubernetes.Interface, namespace, serviceAccount string, imagePullSecrets []string) Option

WithKeychainPullSecrets provides initialize registry client option that allows to use pull secrets.

Jump to

Keyboard shortcuts

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