Documentation ¶
Index ¶
- func ImportLessonDefs(syringeConfig *config.SyringeConfig) (map[int32]*pb.LessonDef, error)
- func IsEmptyValue(e reflect.Value) bool
- func TestGCWithAPIServerCreatedLessons(t *testing.T)
- type SyringeAPIServer
- func (s *SyringeAPIServer) AddSessiontoGCWhitelist(ctx context.Context, session *pb.Session) (*pb.HealthCheckMessage, error)
- func (s *SyringeAPIServer) DeleteLiveLesson(uuid string)
- func (s *SyringeAPIServer) DeleteVerificationTask(uuid string)
- func (s *SyringeAPIServer) GetAllLessonPrereqs(ctx context.Context, lid *pb.LessonID) (*pb.LessonPrereqs, error)
- func (s *SyringeAPIServer) GetGCWhitelist(ctx context.Context, _ *empty.Empty) (*pb.Sessions, error)
- func (s *SyringeAPIServer) GetKubeLab(ctx context.Context, uuid *pb.KubeLabUuid) (*pb.KubeLab, error)
- func (s *SyringeAPIServer) GetLessonDef(ctx context.Context, lid *pb.LessonID) (*pb.LessonDef, error)
- func (s *SyringeAPIServer) GetLiveLesson(ctx context.Context, uuid *pb.LessonUUID) (*pb.LiveLesson, error)
- func (s *SyringeAPIServer) GetSyringeInfo(ctx context.Context, _ *empty.Empty) (*pb.SyringeInfo, error)
- func (s *SyringeAPIServer) GetSyringeState(ctx context.Context, _ *empty.Empty) (*pb.SyringeState, error)
- func (s *SyringeAPIServer) GetVerification(ctx context.Context, vtUUID *pb.VerificationTaskUUID) (*pb.VerificationTask, error)
- func (s *SyringeAPIServer) HealthCheck(ctx context.Context, _ *empty.Empty) (*pb.HealthCheckMessage, error)
- func (s *SyringeAPIServer) KillLiveLesson(ctx context.Context, uuid *pb.LessonUUID) (*pb.KillLiveLessonStatus, error)
- func (s *SyringeAPIServer) ListKubeLabs(ctx context.Context, _ *empty.Empty) (*pb.KubeLabs, error)
- func (s *SyringeAPIServer) ListLessonDefs(ctx context.Context, filter *pb.LessonDefFilter) (*pb.LessonDefs, error)
- func (s *SyringeAPIServer) ListLiveLessons(ctx context.Context, _ *empty.Empty) (*pb.LiveLessons, error)
- func (s *SyringeAPIServer) LiveLessonExists(uuid string) bool
- func (s *SyringeAPIServer) RemoveSessionFromGCWhitelist(ctx context.Context, session *pb.Session) (*pb.HealthCheckMessage, error)
- func (s *SyringeAPIServer) RequestLiveLesson(ctx context.Context, lp *pb.LessonParams) (*pb.LessonUUID, error)
- func (s *SyringeAPIServer) RequestVerification(ctx context.Context, uuid *pb.LessonUUID) (*pb.VerificationTaskUUID, error)
- func (s *SyringeAPIServer) SetLiveLesson(uuid string, ll *pb.LiveLesson)
- func (s *SyringeAPIServer) SetVerificationTask(uuid string, vt *pb.VerificationTask)
- func (apiServer *SyringeAPIServer) StartAPI(ls *scheduler.LessonScheduler, buildInfo map[string]string) error
- func (s *SyringeAPIServer) UpdateLiveLessonStage(uuid string, stage int32)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportLessonDefs ¶ added in v0.1.4
func IsEmptyValue ¶ added in v0.1.4
func TestGCWithAPIServerCreatedLessons ¶ added in v0.3.2
Types ¶
type SyringeAPIServer ¶ added in v0.3.2
type SyringeAPIServer struct { // in-memory map of liveLessons, indexed by UUID // LiveLesson UUID is a string composed of the lesson ID and the session ID together, // separated by a single hyphen. For instance, user session ID 582k2aidfjekxefi and lesson 19 // will result in 19-582k2aidfjekxefi. LiveLessonState map[string]*pb.LiveLesson LiveLessonsMu *sync.Mutex // in-memory map of verification tasks, indexed by UUID+stage // Similar to livelesson but with stage at the end, e.g. 19-582k2aidfjekxefi-1 VerificationTasks map[string]*pb.VerificationTask VerificationTasksMu *sync.Mutex Scheduler *scheduler.LessonScheduler BuildInfo map[string]string }
this will keep our state.
func (*SyringeAPIServer) AddSessiontoGCWhitelist ¶ added in v0.3.2
func (s *SyringeAPIServer) AddSessiontoGCWhitelist(ctx context.Context, session *pb.Session) (*pb.HealthCheckMessage, error)
func (*SyringeAPIServer) DeleteLiveLesson ¶ added in v0.3.2
func (s *SyringeAPIServer) DeleteLiveLesson(uuid string)
func (*SyringeAPIServer) DeleteVerificationTask ¶ added in v0.3.2
func (s *SyringeAPIServer) DeleteVerificationTask(uuid string)
func (*SyringeAPIServer) GetAllLessonPrereqs ¶ added in v0.3.2
func (s *SyringeAPIServer) GetAllLessonPrereqs(ctx context.Context, lid *pb.LessonID) (*pb.LessonPrereqs, error)
func (*SyringeAPIServer) GetGCWhitelist ¶ added in v0.3.2
func (*SyringeAPIServer) GetKubeLab ¶ added in v0.3.2
func (s *SyringeAPIServer) GetKubeLab(ctx context.Context, uuid *pb.KubeLabUuid) (*pb.KubeLab, error)
func (*SyringeAPIServer) GetLessonDef ¶ added in v0.3.2
func (*SyringeAPIServer) GetLiveLesson ¶ added in v0.3.2
func (s *SyringeAPIServer) GetLiveLesson(ctx context.Context, uuid *pb.LessonUUID) (*pb.LiveLesson, error)
func (*SyringeAPIServer) GetSyringeInfo ¶ added in v0.3.2
func (s *SyringeAPIServer) GetSyringeInfo(ctx context.Context, _ *empty.Empty) (*pb.SyringeInfo, error)
func (*SyringeAPIServer) GetSyringeState ¶ added in v0.3.2
func (s *SyringeAPIServer) GetSyringeState(ctx context.Context, _ *empty.Empty) (*pb.SyringeState, error)
func (*SyringeAPIServer) GetVerification ¶ added in v0.3.2
func (s *SyringeAPIServer) GetVerification(ctx context.Context, vtUUID *pb.VerificationTaskUUID) (*pb.VerificationTask, error)
func (*SyringeAPIServer) HealthCheck ¶ added in v0.3.2
func (s *SyringeAPIServer) HealthCheck(ctx context.Context, _ *empty.Empty) (*pb.HealthCheckMessage, error)
func (*SyringeAPIServer) KillLiveLesson ¶ added in v0.3.2
func (s *SyringeAPIServer) KillLiveLesson(ctx context.Context, uuid *pb.LessonUUID) (*pb.KillLiveLessonStatus, error)
func (*SyringeAPIServer) ListKubeLabs ¶ added in v0.3.2
func (*SyringeAPIServer) ListLessonDefs ¶ added in v0.3.2
func (s *SyringeAPIServer) ListLessonDefs(ctx context.Context, filter *pb.LessonDefFilter) (*pb.LessonDefs, error)
func (*SyringeAPIServer) ListLiveLessons ¶ added in v0.3.2
func (s *SyringeAPIServer) ListLiveLessons(ctx context.Context, _ *empty.Empty) (*pb.LiveLessons, error)
func (*SyringeAPIServer) LiveLessonExists ¶ added in v0.3.2
func (s *SyringeAPIServer) LiveLessonExists(uuid string) bool
func (*SyringeAPIServer) RemoveSessionFromGCWhitelist ¶ added in v0.3.2
func (s *SyringeAPIServer) RemoveSessionFromGCWhitelist(ctx context.Context, session *pb.Session) (*pb.HealthCheckMessage, error)
func (*SyringeAPIServer) RequestLiveLesson ¶ added in v0.3.2
func (s *SyringeAPIServer) RequestLiveLesson(ctx context.Context, lp *pb.LessonParams) (*pb.LessonUUID, error)
func (*SyringeAPIServer) RequestVerification ¶ added in v0.3.2
func (s *SyringeAPIServer) RequestVerification(ctx context.Context, uuid *pb.LessonUUID) (*pb.VerificationTaskUUID, error)
func (*SyringeAPIServer) SetLiveLesson ¶ added in v0.3.2
func (s *SyringeAPIServer) SetLiveLesson(uuid string, ll *pb.LiveLesson)
func (*SyringeAPIServer) SetVerificationTask ¶ added in v0.3.2
func (s *SyringeAPIServer) SetVerificationTask(uuid string, vt *pb.VerificationTask)
func (*SyringeAPIServer) StartAPI ¶ added in v0.3.2
func (apiServer *SyringeAPIServer) StartAPI(ls *scheduler.LessonScheduler, buildInfo map[string]string) error
func (*SyringeAPIServer) UpdateLiveLessonStage ¶ added in v0.3.2
func (s *SyringeAPIServer) UpdateLiveLessonStage(uuid string, stage int32)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.