Documentation ¶
Overview ¶
Responsible for creating all resources for a lab. Pods, services, networks, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDevices ¶ added in v0.1.4
Types ¶
type KubeLab ¶
type KubeLab struct { Namespace *corev1.Namespace CreateRequest *LessonScheduleRequest // The request that originally resulted in this KubeLab Networks map[string]*crd.NetworkAttachmentDefinition Pods map[string]*corev1.Pod Services map[string]*corev1.Service Ingresses map[string]*v1beta1.Ingress LabConnections map[string]string Status pb.Status ReachableEndpoints []string // endpoint names }
KubeLab is the collection of kubernetes resources that makes up a lab instance
func (*KubeLab) ToLiveLesson ¶
func (kl *KubeLab) ToLiveLesson() *pb.LiveLesson
ToLiveLesson exports a KubeLab as a generic LiveLesson so the API can use it
type LessonScheduleRequest ¶
type LessonScheduleResult ¶
type LessonScheduler ¶
type LessonScheduler struct { KubeConfig *rest.Config Requests chan *LessonScheduleRequest Results chan *LessonScheduleResult LessonDefs map[int32]*pb.LessonDef SyringeConfig *config.SyringeConfig GcWhiteList map[string]*pb.Session GcWhiteListMu *sync.Mutex }
func (*LessonScheduler) Start ¶
func (ls *LessonScheduler) Start() error
Start is meant to be run as a goroutine. The "requests" channel will wait for new requests, attempt to schedule them, and put a results message on the "results" channel when finished (success or fail)
type OperationType ¶
type OperationType int32
var ( OperationType_CREATE OperationType = 0 OperationType_MODIFY OperationType = 1 OperationType_BOOP OperationType = 2 OperationType_GC OperationType = 3 )
Click to show internal directories.
Click to hide internal directories.