restream

package
v0.0.0-...-31c1c1e Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID           string
	Name         string
	Store        store.Store
	DiskFS       fs.Filesystem
	MemFS        fs.Filesystem
	FFmpeg       ffmpeg.FFmpeg
	MaxProcesses int64
	Logger       log.Logger
}

Config is the required configuration for a new restreamer instance.

type Restreamer

type Restreamer interface {
	ID() string                                                // ID of this instance
	Name() string                                              // Arbitrary name of this instance
	CreatedAt() time.Time                                      // time of when this instance has been created
	Start()                                                    // start all processes that have a "start" order
	Stop()                                                     // stop all running process but keep their "start" order
	AddProcess(config *app.Config) error                       // add a new process
	GetProcessIDs() []string                                   // get a list of all process IDs
	DeleteProcess(id string) error                             // delete a process
	StartProcess(id string) error                              // start a process
	StopProcess(id string) error                               // stop a process
	RestartProcess(id string) error                            // restart a process
	ReloadProcess(id string) error                             // reload a process
	GetProcess(id string) (*app.Process, error)                // get a process
	GetProcessState(id string) (*app.State, error)             // get the state of a process
	GetProcessLog(id string) (*app.Log, error)                 // get the logs of a process
	GetPlayout(id, inputid string) (string, error)             // get the URL of the playout API for a process
	Probe(id string) app.Probe                                 // probe a process
	Skills() skills.Skills                                     // get the ffmpeg skills
	ReloadSkills() error                                       // reload the ffmpeg skills
	SetProcessMetadata(id, key string, data interface{}) error // set metatdata to a process
	GetProcessMetadata(id, key string) (interface{}, error)    // get previously set metadata from a process
	SetMetadata(key string, data interface{}) error            // set general metadata
	GetMetadata(key string) (interface{}, error)               // get previously set general metadata
}

The Restreamer interface

func New

func New(config Config) (Restreamer, error)

New returns a new instance that implements the Restreamer interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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