preloader

package
v0.16.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPreloaderNameAlreadyExists = errors.New("PreloaderNameAlreadyExists", "preloader name '%s' already exists")
)

Functions

This section is empty.

Types

type Error

type Error = errors.Error

type Preloader

type Preloader struct {
	Name   string   `json:"name"`
	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(name string, 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