Documentation
¶
Overview ¶
Package workergrpc is the gRPC link between tum-live and its workers: the server the workers call (join, heartbeats, stream and transcoding notifications) and the calls the main process makes to them (dispatching streams, previews, thumbnails).
Index ¶
- func CreateStreamRequest(daoWrapper dao.DaoWrapper, stream model.Stream, course model.Course, ...)
- func DeleteVideoSectionImage(workerDao dao.WorkerDao, path string) error
- func FetchLivePreviews(daoWrapper dao.DaoWrapper, runners LivePreviewer) func()
- func GenerateVideoSectionImages(daoWrapper dao.DaoWrapper, parameters *SectionImagesParameters) error
- func NotifyWorkers(daoWrapper dao.DaoWrapper) func()
- func ServeWorkerGRPC(subtitleClient subtitle_proto.SubtitleGeneratorClient, subtitleAuth string)
- type LivePreviewer
- type SectionImagesParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStreamRequest ¶
func DeleteVideoSectionImage ¶
func FetchLivePreviews ¶
func FetchLivePreviews(daoWrapper dao.DaoWrapper, runners LivePreviewer) func()
FetchLivePreviews gets a live thumbnail from a runner for every live stream.
func GenerateVideoSectionImages ¶
func GenerateVideoSectionImages(daoWrapper dao.DaoWrapper, parameters *SectionImagesParameters) error
func NotifyWorkers ¶
func NotifyWorkers(daoWrapper dao.DaoWrapper) func()
NotifyWorkers collects all streams that are due to stream (starts in the next 10 minutes from a lecture hall) and invokes the corresponding calls at the workers with the least workload via gRPC
func ServeWorkerGRPC ¶
func ServeWorkerGRPC(subtitleClient subtitle_proto.SubtitleGeneratorClient, subtitleAuth string)
ServeWorkerGRPC initializes a gRPC server on port 50052
Types ¶
type LivePreviewer ¶ added in v1.11.3
type LivePreviewer interface {
RequestLivePreview(ctx context.Context, playlistURL string) ([]byte, error)
}
LivePreviewer produces a JPEG of the most recent state of a livestream. The runner manager is the implementation; it is an interface so this package doesn't depend on it.
type SectionImagesParameters ¶
type SectionImagesParameters struct {
Sections []model.VideoSection
PlaylistURL, CourseName, CourseTeachingTerm string
CourseYear uint32
}
SectionImagesParameters is what a worker needs to cut thumbnails for sections.