forward

package
v1.20.1-soundar.7 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package forward contains stream forwarding utilities.

Index

Constants

This section is empty.

Variables

View Source
var ErrDestNotFound = errors.New("forward destination not found")

ErrDestNotFound is returned when a forward destination is not found.

Functions

This section is empty.

Types

type Dest

type Dest interface {
	Run(context.Context) error
	OutboundBytes() uint64
}

Dest is a protocol-specific forward destination.

type DestHandler

type DestHandler struct {
	Pos               int
	Conf              conf.ForwardDest
	ReadTimeout       conf.Duration
	WriteTimeout      conf.Duration
	UDPMaxPayloadSize int
	PathName          string
	Matches           []string
	Parent            logger.Writer
	// contains filtered or unexported fields
}

DestHandler manages a forward destination.

func (*DestHandler) APIItem

func (h *DestHandler) APIItem() defs.APIForwardDest

APIItem returns an API item.

func (*DestHandler) ID

func (h *DestHandler) ID() uuid.UUID

ID returns the ID.

func (*DestHandler) Log

func (h *DestHandler) Log(level logger.Level, format string, args ...any)

Log implements logger.Writer.

type Manager

type Manager struct {
	ReadTimeout       conf.Duration
	WriteTimeout      conf.Duration
	UDPMaxPayloadSize int
	PathName          string
	Matches           []string
	Forward           conf.Forward
	Parent            ManagerParent
	// contains filtered or unexported fields
}

Manager manages the forward destinations of a path.

func (*Manager) APIGet

func (m *Manager) APIGet(id uuid.UUID) (*defs.APIForwardDest, error)

APIGet gets a forward destination.

func (*Manager) APIList

func (m *Manager) APIList() *defs.APIForwardDestList

APIList lists all forward destinations.

func (*Manager) Initialize

func (m *Manager) Initialize()

Initialize initializes Manager.

func (*Manager) Log

func (m *Manager) Log(level logger.Level, format string, args ...any)

Log implements logger.Writer.

func (*Manager) ReloadConf

func (m *Manager) ReloadConf(forward conf.Forward)

ReloadConf reloads statically-configured destinations.

func (*Manager) Start

func (m *Manager) Start(strm *stream.Stream)

Start starts all forward destinations.

func (*Manager) Stop

func (m *Manager) Stop()

Stop stops all forward destinations.

type ManagerParent

type ManagerParent interface {
	logger.Writer
}

ManagerParent is the parent interface.

Directories

Path Synopsis
Package rtmp contains the RTMP forward destination.
Package rtmp contains the RTMP forward destination.
Package rtsp contains the RTSP forward destination.
Package rtsp contains the RTSP forward destination.
Package srt contains the SRT forward destination.
Package srt contains the SRT forward destination.
Package webrtc contains the WebRTC/WHIP forward destination.
Package webrtc contains the WebRTC/WHIP forward destination.

Jump to

Keyboard shortcuts

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