preloader

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGeneratingK8sNameForPreloader = errors.New("GeneratingK8sNameForPreloader", "error generating k8s name for preloader")
)

Functions

This section is empty.

Types

type Error

type Error = errors.Error

type Preloader

type Preloader struct {
	K8sName string   `json:"k8sName"`
	Images  []string `json:"images"`
	system.SystemDependencies
}

Preloader is a struct that contains the list of preloaded images. A preloader makes sure that the images are preloaded before the test suite starts. Hint: If you use a Preloader per test suite, you can save resources

func New

func New(sysDeps system.SystemDependencies) (*Preloader, error)

New creates a new preloader

func (*Preloader) AddImage

func (p *Preloader) AddImage(ctx context.Context, image string) error

AddImage adds an image to the list of preloaded images

func (*Preloader) Cleanup added in v0.15.1

func (p *Preloader) Cleanup(ctx context.Context) error

func (*Preloader) EmptyImages

func (p *Preloader) EmptyImages(ctx context.Context) error

EmptyImages empties the list of preloaded images

func (*Preloader) GetImages

func (p *Preloader) GetImages() []string

Images returns the list of preloaded images

func (*Preloader) RemoveImage

func (p *Preloader) RemoveImage(ctx context.Context, image string) error

RemoveImage removes an image from the list of preloaded images

Jump to

Keyboard shortcuts

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