exercise

package
v0.0.0-...-eeb3e7f Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DuplicateTagErr = errors.New("Tag already exists")
	MissingTagsErr  = errors.New("No tags, need atleast one tag")
	UnknownTagErr   = errors.New("Unknown tag")
	RegistryLink    = "registry.gitlab.com"

	OvaSuffix = ".ova"
)

Functions

func NewExercise

func NewExercise(conf store.Exercise, dhost DockerHost, vlib vbox.Library, net docker.Network, dnsAddr string) *exercise

Types

type DNSRecord

type DNSRecord struct {
	Record map[string]string
}

type DockerHost

type DockerHost interface {
	CreateContainer(ctx context.Context, conf docker.ContainerConfig) (docker.Container, error)
}

type Environment

type Environment interface {
	Create(context.Context, int32) error
	Add(context.Context, ...store.Exercise) error
	ResetByTag(context.Context, string) error
	Reset(context.Context) error
	NetworkInterface() string
	LabSubnet() string
	LabDNS() string
	DNSRecords() []*DNSRecord
	Challenges() []store.Challenge
	InstanceInfo() []virtual.InstanceInfo
	Start(context.Context) error
	StartByTag(context.Context, string) error
	StopByTag(string) error
	Stop() error
	Suspend(ctx context.Context) error
	Resume(ctx context.Context) error
	SetDisabledExercises([]store.Tag)
	io.Closer
}

func NewEnvironment

func NewEnvironment(lib vbox.Library) Environment

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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