service

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2026 License: Apache-2.0 Imports: 43 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmd added in v1.3.0

func NewCmd(_ context.Context, p *params.Params) (*exec.Cmd, error)

Types

type Handler

type Handler struct {
	ipc.UnimplementedIngressHandlerServer
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(conf *config.Config) *Handler

func (*Handler) GatherMediaStats added in v1.3.0

func (*Handler) GetPProf added in v1.1.0

func (h *Handler) GetPProf(ctx context.Context, req *ipc.PProfRequest) (*ipc.PProfResponse, error)

func (*Handler) GetPipelineDot added in v1.1.0

func (*Handler) HandleIngress

func (h *Handler) HandleIngress(ctx context.Context, info *livekit.IngressInfo, wsUrl, token, projectID, relayToken string, featureFlags map[string]string, loggingFields map[string]string, extraParams any) error

func (*Handler) Kill

func (h *Handler) Kill()

func (*Handler) KillIngress added in v1.5.0

func (*Handler) UpdateMediaStats added in v1.1.0

func (h *Handler) UpdateMediaStats(ctx context.Context, in *ipc.UpdateMediaStatsRequest) (*google_protobuf2.Empty, error)

type ProcessManager

type ProcessManager struct {
	ipc.UnimplementedIngressServiceServer
	// contains filtered or unexported fields
}

func NewProcessManager

func NewProcessManager(sm *SessionManager, stateNotifier utils.StateNotifier, bus psrpc.MessageBus, newCmd func(ctx context.Context, p *params.Params) (*exec.Cmd, error)) (*ProcessManager, error)

func (*ProcessManager) UpdateIngressState added in v1.5.0

func (s *ProcessManager) UpdateIngressState(ctx context.Context, req *ipc.UpdateIngressStateRequest) (*emptypb.Empty, error)

type Relay added in v1.0.0

type Relay struct {
	// contains filtered or unexported fields
}

func NewRelay added in v1.0.0

func NewRelay(rtmpServer *rtmp.RTMPServer, whipServer *whip.WHIPServer) *Relay

func (*Relay) Start added in v1.0.0

func (r *Relay) Start(conf *config.Config) error

func (*Relay) Stop added in v1.0.0

func (r *Relay) Stop() error

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	conf *config.Config,
	psrpcClient rpc.IOInfoClient,
	stateNotifier utils.StateNotifier,
	bus psrpc.MessageBus,
	rtmpSrv *rtmp.RTMPServer,
	whipSrv *whip.WHIPServer,
	newCmd func(ctx context.Context, p *params.Params) (*exec.Cmd, error),
	listIngressTopic string,
) (*Service, error)

func (*Service) AvailabilityHandler added in v1.0.0

func (s *Service) AvailabilityHandler(w http.ResponseWriter, _ *http.Request)

func (*Service) CanAccept

func (s *Service) CanAccept() bool

func (*Service) GetAvailableCPU added in v1.5.0

func (s *Service) GetAvailableCPU() float64

func (*Service) GetGstPipelineDotFile added in v1.1.0

func (s *Service) GetGstPipelineDotFile(resourceID string) (string, error)

func (*Service) GetHealthHandlers added in v1.2.2

func (s *Service) GetHealthHandlers() whip.HealthHandlers

func (*Service) HandleRTMPPublishRequest

func (s *Service) HandleRTMPPublishRequest(streamKey, resourceId string) (*params.Params, *stats.LocalMediaStatsGatherer, error)

func (*Service) HandleURLPublishRequest added in v1.1.0

func (s *Service) HandleURLPublishRequest(ctx context.Context, resourceId string, projectID string, req *rpc.StartIngressRequest) (*livekit.IngressInfo, error)

func (*Service) HandleWHIPPublishRequest added in v1.0.0

func (s *Service) HandleWHIPPublishRequest(streamKey, resourceId string) (p *params.Params, ready func(mimeTypes map[types.StreamKind]string, err error) *stats.LocalMediaStatsGatherer, ended func(err error), err error)

func (*Service) HealthHandler added in v1.0.0

func (s *Service) HealthHandler(w http.ResponseWriter, _ *http.Request)

func (*Service) IsActive added in v1.2.2

func (s *Service) IsActive() bool

func (*Service) ListActiveIngress

func (*Service) ListIngress

func (s *Service) ListIngress() []*rpc.IngressSession

func (*Service) Pause added in v1.2.2

func (s *Service) Pause()

func (*Service) Resume added in v1.2.2

func (s *Service) Resume()

func (*Service) Run

func (s *Service) Run() error

func (*Service) StartDebugHandlers added in v1.1.0

func (s *Service) StartDebugHandlers()

func (*Service) StartIngress added in v1.1.0

func (s *Service) StartIngress(ctx context.Context, req *rpc.StartIngressRequest) (*livekit.IngressInfo, error)

func (*Service) StartIngressAffinity added in v1.1.0

func (s *Service) StartIngressAffinity(_ context.Context, req *rpc.StartIngressRequest) float32

func (*Service) Stop

func (s *Service) Stop(kill bool)

func (*Service) UpdateConfig added in v1.2.2

func (s *Service) UpdateConfig(conf *config.Config)

type SessionManager added in v1.0.0

type SessionManager struct {
	// contains filtered or unexported fields
}

func NewSessionManager added in v1.0.0

func NewSessionManager(monitor *stats.Monitor, rpcSrv rpc.IngressInternalServer) *SessionManager

func (*SessionManager) GetIngressMediaStats added in v1.3.0

func (sm *SessionManager) GetIngressMediaStats(resourceId string) (*stats.LocalMediaStatsGatherer, error)

func (*SessionManager) GetIngressSessionAPI added in v1.1.0

func (sm *SessionManager) GetIngressSessionAPI(resourceId string) (types.SessionAPI, error)

func (*SessionManager) HandlerExited added in v1.6.0

func (sm *SessionManager) HandlerExited(pid int, state *os.ProcessState)

HandlerExited records the run of the exited handler process pid.

func (*SessionManager) HandlerStarted added in v1.6.0

func (sm *SessionManager) HandlerStarted(info *livekit.IngressInfo, pid int)

HandlerStarted attributes the handler process pid to the session in info.

func (*SessionManager) HandlerStateUpdated added in v1.6.0

func (sm *SessionManager) HandlerStateUpdated(info *livekit.IngressInfo)

HandlerStateUpdated records the input tracks a handler reported for the session in info.

func (*SessionManager) IngressEnded added in v1.0.0

func (sm *SessionManager) IngressEnded(resourceID string)

func (*SessionManager) IngressStarted added in v1.0.0

func (sm *SessionManager) IngressStarted(info *livekit.IngressInfo, sessionAPI types.SessionAPI)

func (*SessionManager) IsIdle added in v1.0.0

func (sm *SessionManager) IsIdle() bool

func (*SessionManager) ListIngress added in v1.0.0

func (sm *SessionManager) ListIngress() []*rpc.IngressSession

Jump to

Keyboard shortcuts

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