workergrpc

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2026 License: MIT Imports: 29 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateStreamRequest

func CreateStreamRequest(daoWrapper dao.DaoWrapper, stream model.Stream, course model.Course, workers []model.Worker, sourceType string, source string)

func DeleteVideoSectionImage

func DeleteVideoSectionImage(workerDao dao.WorkerDao, path string) error

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.

Jump to

Keyboard shortcuts

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