registry

package
v0.0.0-...-696ba86 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UsernameSecretKeyName = "username"
	PasswordSecretKeyName = "password"
	URLSecretKeyName      = "registryAddress"
)

Variables

This section is empty.

Functions

func FunctionFromImageName

func FunctionFromImageName(image string) (function, namespace string, err error)

func GetFunctionDeploymentList

func GetFunctionDeploymentList(config *rest.Config) (*appsv1.DeploymentList, error)

func GetFunctionImage

func GetFunctionImage(d appsv1.Deployment) (reference.NamedTagged, error)

func IsFunctionUpdating

func IsFunctionUpdating(config *rest.Config, name, namespace string) (bool, error)

Types

type NestedSet

type NestedSet map[string]map[string]struct{}

func NewNestedSet

func NewNestedSet() NestedSet

func (NestedSet) AddKeyWithValue

func (f NestedSet) AddKeyWithValue(key, value string)

func (NestedSet) GetKey

func (f NestedSet) GetKey(key string) map[string]struct{}

func (NestedSet) HasKey

func (f NestedSet) HasKey(key string) bool

func (NestedSet) HasKeyWithValue

func (f NestedSet) HasKeyWithValue(key, value string) bool

func (NestedSet) ListKeys

func (f NestedSet) ListKeys() []string

type RegistryClient

type RegistryClient interface {
	ImageRepository(imageName string) (RepositoryClient, error)
	ListRegistryImagesLayers() (NestedSet, error)
	ListRegistryCachedLayers() (NestedSet, error)
	Repositories() ([]string, error)
}

func NewRegistryClient

func NewRegistryClient(ctx context.Context, opts *RegistryClientOptions, l logr.Logger) (RegistryClient, error)

type RegistryClientOptions

type RegistryClientOptions struct {
	Username string
	Password string
	URL      string
}

func ReadRegistryConfigSecretOrDie

func ReadRegistryConfigSecretOrDie(resetConfig *rest.Config, secretName, namespace string) *RegistryClientOptions

type RepositoryClient

type RepositoryClient interface {
	ListTags() ([]string, error)
	GetImageTag(tag string) (*Tag, error)
	DeleteImageTag(tagDigest digest.Digest) error
	ManifestService() distribution.ManifestService
}

type Tag

type Tag struct {
	distribution.Descriptor
}

Jump to

Keyboard shortcuts

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