Documentation ¶
Index ¶
- func GetLabScenarioFromConfig(students, tasks string) ([]*Student, []*TaskDefinition, error)
- type Assignment
- type AssignmentState
- type Lab
- func (l *Lab) GetState() *LabState
- func (l *Lab) LabScenarioHandler(w http.ResponseWriter, r *http.Request)
- func (l *Lab) LabStateHandler(w http.ResponseWriter, r *http.Request)
- func (l *Lab) Run() error
- func (l *Lab) SetupScenario(name string, cycle uint, duration time.Duration, students []*Student, ...)
- func (l *Lab) Stop() error
- type LabState
- type Maker
- type Student
- type Task
- type TaskDefinition
- type TaskState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLabScenarioFromConfig ¶
func GetLabScenarioFromConfig(students, tasks string) ([]*Student, []*TaskDefinition, error)
Types ¶
type Assignment ¶
func (*Assignment) GetState ¶
func (a *Assignment) GetState() *AssignmentState
type AssignmentState ¶
type Lab ¶
type Lab struct { Name string Cycle uint IsRunning bool IsFinished bool // contains filtered or unexported fields }
func NewLabController ¶
func NewLabController() *Lab
func NewLabFromState ¶
func (*Lab) LabScenarioHandler ¶
func (l *Lab) LabScenarioHandler(w http.ResponseWriter, r *http.Request)
func (*Lab) LabStateHandler ¶
func (l *Lab) LabStateHandler(w http.ResponseWriter, r *http.Request)
func (*Lab) SetupScenario ¶
type Maker ¶
type Maker interface { NewTask(ctx context.Context, def *TaskDefinition, s *Student) (Task, error) MakeTaskFromState(ctx context.Context, state *TaskState, s *Student) (Task, error) }
func NewTaskMaker ¶
func NewTaskMaker() Maker
type Student ¶
type Student struct { FirstName string `yaml:"firstName" json:"firstName"` LastName string `yaml:"lastName" json:"lastName"` DockerhubUsername string `yaml:"dockerhubUsername" json:"dockerhubUsername"` GithubUsername string `yaml:"githubUsername" json:"githubUsername"` K8sNamespace string `yaml:"k8sNamespace" json:"k8sNamespace"` }
type TaskDefinition ¶
type TaskState ¶
type TaskState struct { Def *TaskDefinition `json:"taskDefinition"` Completed bool `json:"completed"` UUID string `json:"uuid"` }
Click to show internal directories.
Click to hide internal directories.