Versions in this module Expand all Collapse all v0 v0.19.2 Jul 10, 2024 Changes in this version + const AdminChannelField + const AuthHeader + const AuthTokenPrefix + const TokenCtxField + var QueueHits = prometheus.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + var QueueItemAge = prometheus.NewSummaryVec(prometheus.SummaryOpts{ ... }, []string{ ... }) + var QueueLength = prometheus.NewGaugeVec(prometheus.GaugeOpts{ ... }, []string{ ... }) + func CORSMiddleware(h fasthttp.RequestHandler) fasthttp.RequestHandler + func CreateRoutes(r *router.Router, manager *VideoManager, log logging.KVLogger, cb AuthCallback) + func MetricsMiddleware(h fasthttp.RequestHandler) fasthttp.RequestHandler + func RegisterMetrics() + func SetLogger(l *zap.SugaredLogger) + type AuthCallback func(*fasthttp.RequestCtx) bool + type Gatekeeper func(key string, value interface{}, queue *mfr.Queue) bool + type HttpServerConfig struct + Bind string + ManagerToken string + type Pool struct + func NewPool() *Pool + func (p *Pool) AddQueue(name string, minHits uint, k Gatekeeper) + func (p *Pool) Admit(key string, value interface{}) error + func (p *Pool) Next() *mfr.Item + func (p *Pool) Out() <-chan *mfr.Item + func (p *Pool) Start() + func (p *Pool) Stop() + type TranscodingRequest struct + func (r *TranscodingRequest) Complete() + func (r *TranscodingRequest) Reject() + func (r *TranscodingRequest) Release() + type VideoLibrary interface + GetAllChannels func() ([]db.Channel, error) + GetURL func(sdHash string) (string, error) + type VideoManager struct + func NewManager(lib *library.Library, minHits int) *VideoManager + func (m *VideoManager) Library() *library.Library + func (m *VideoManager) Pool() *Pool + func (m *VideoManager) RequestStatus(sdHash string) int + func (m *VideoManager) Requests() <-chan *TranscodingRequest + func (m *VideoManager) ResolveStream(uri string) (*TranscodingRequest, error) + func (m *VideoManager) StartHttpServer(config HttpServerConfig) (chan struct{}, error) + func (m *VideoManager) Video(uri string) (string, error)