registry

package
v0.0.90 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoRegistry = errors.New("no registry configured")
)

Functions

func AllocateStaticName

func AllocateStaticName(r Manager, url, repository string, keychain oci.Keychain) compute.Computable[oci.AllocatedRepository]

func AttachStaticKeychain

func AttachStaticKeychain(r Manager, img oci.ImageID, keychain oci.Keychain) oci.AllocatedRepository

func Register

func Register(name string, make func(context.Context, cfg.Configuration) (Manager, error))

XXX use external plugin system.

func StaticName

func StaticName(parent Manager, imageID oci.ImageID, insecure bool, keychain oci.Keychain) compute.Computable[oci.AllocatedRepository]

Types

type Manager

type Manager interface {
	// Returns true if calls to the registry should be made over HTTP (instead of HTTPS).
	IsInsecure() bool

	AllocateName(repository string) compute.Computable[oci.AllocatedRepository]
	AttachKeychain(oci.ImageID) (oci.AllocatedRepository, error)
}

func GetRegistry

func GetRegistry(ctx context.Context, env cfg.Context) (Manager, error)

func GetRegistryFromConfig

func GetRegistryFromConfig(ctx context.Context, env string, cfg cfg.Configuration) (Manager, error)

func MakeStaticRegistry

func MakeStaticRegistry(r *registry.Registry) Manager

Jump to

Keyboard shortcuts

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