registryredirector

package
v0.0.0-...-3a6e21b Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package registryredirector provides basic utilities around configuring the fake image registry server component for integration testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Cluster to be used in a multicluster environment
	Cluster cluster.Cluster
	// Upstream registry. Default is "gcr.io".
	TargetRegistry string
	// URL scheme for the registry. Default is "https".
	Scheme string
	// Docker image location of the fake registry. Default is "gcr.io/istio-testing/fake-registry:x.x".
	// Please refer to registry_redirector_server.yaml for the exact default image.
	Image string
}

Config defines the options for creating an registry redirector component.

type Instance

type Instance interface {
	// Address is the address of the service provided by the
	// registry redirector server.
	Address() string

	// SetupTagMap posts the tag map to the registryredirector.
	SetupTagMap(map[string]string) error
}

Instance represents a deployed registry redirector app instance.

func New

func New(ctx resource.Context, c Config) (i Instance, err error)

New returns a new instance of registry redirector.

func NewOrFail

func NewOrFail(t test.Failer, ctx resource.Context, c Config) Instance

NewOrFail returns a new registry redirector instance or fails test.

Jump to

Keyboard shortcuts

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