lab

package
v0.0.0-...-caea6a0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBufferSize = errors.New("Buffer cannot be larger than capacity")
	ErrNoLabByTag = errors.New("Could not find lab by the specified tag")
)

Functions

func NewHub

func NewHub(creator Creator, buffer int, cap int) (*hub, error)

Types

type Config

type Config struct {
	Frontends []store.InstanceConfig
	Exercises []store.Exercise
}

func (Config) Flags

func (conf Config) Flags() []store.FlagConfig

type Creator

type Creator interface {
	NewLab(context.Context) (Lab, error)
}

type Hub

type Hub interface {
	Queue() <-chan Lab
	Close() error
	GetLabByTag(string) (Lab, error)
}

type Lab

type Lab interface {
	Start(context.Context) error
	Stop() error
	Restart(context.Context) error
	Environment() exercise.Environment
	ResetFrontends(ctx context.Context) error
	RdpConnPorts() []uint
	Tag() string
	InstanceInfo() []virtual.InstanceInfo
	io.Closer
}

type LabHost

type LabHost struct {
	Vlib vbox.Library
	Conf Config
}

func (*LabHost) NewLab

func (lh *LabHost) NewLab(ctx context.Context) (Lab, error)

Jump to

Keyboard shortcuts

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