Documentation
¶
Index ¶
- Constants
- Variables
- func ByteStr(bytes int) string
- func DurationStr(seconds int) string
- func MBStr(mibs int) string
- type Channel
- func (w *Channel) Filename() string
- func (w *Channel) Pause()
- func (w *Channel) Resume()
- func (w *Channel) Run()
- func (w *Channel) SegmentDurationStr() string
- func (w *Channel) SegmentFilesizeStr() string
- func (w *Channel) SplitDurationStr() string
- func (w *Channel) SplitFilesizeStr() string
- func (w *Channel) Stop()
- type Config
- type Manager
- func (m *Manager) CreateChannel(conf *Config) error
- func (m *Manager) DeleteChannel(username string) error
- func (m *Manager) GetChannel(username string) (*Channel, error)
- func (m *Manager) ListChannels() ([]*Channel, error)
- func (m *Manager) ListenUpdate() (<-chan *Update, string)
- func (m *Manager) LoadChannels() error
- func (m *Manager) PauseChannel(username string) error
- func (m *Manager) ResumeChannel(username string) error
- func (m *Manager) SaveChannels() error
- func (m *Manager) StopListenUpdate(id string) error
- type Update
Constants ¶
View Source
const ( ResolutionFallbackUpscale = "up" ResolutionFallbackDownscale = "down" )
Variables ¶
Functions ¶
func DurationStr ¶
Types ¶
type Channel ¶
type Channel struct { Username string ChannelURL string LastStreamedAt string Interval int Framerate int Resolution int ResolutionFallback string SegmentDuration int // Seconds SplitDuration int // Minutes SegmentFilesize int // Bytes SplitFilesize int // MB IsOnline bool IsPaused bool Logs []string PauseChannel chan bool UpdateChannel chan *Update ResumeChannel chan bool // contains filtered or unexported fields }
func (*Channel) SegmentDurationStr ¶
func (*Channel) SegmentFilesizeStr ¶
func (*Channel) SplitDurationStr ¶
func (*Channel) SplitFilesizeStr ¶
type Config ¶
type Config struct { Username string FilenamePattern string Framerate int Resolution int ResolutionFallback string SplitDuration int SplitFilesize int Interval int }
Config
type Manager ¶
type Manager struct { Channels map[string]*Channel Updates map[string]chan *Update // contains filtered or unexported fields }
Manager
func (*Manager) DeleteChannel ¶
DeleteChannel
func (*Manager) GetChannel ¶
GetChannel
func (*Manager) ListenUpdate ¶
ListenUpdate
func (*Manager) ResumeChannel ¶
ResumeChannel
func (*Manager) StopListenUpdate ¶
StopListenUpdate
type Update ¶
type Update struct { Username string `json:"username"` Log string `json:"log"` IsPaused bool `json:"is_paused"` IsOnline bool `json:"is_online"` IsStopped bool `json:"is_stopped"` Filename string `json:"filename"` LastStreamedAt string `json:"last_streamed_at"` SegmentDuration int `json:"segment_duration"` SegmentFilesize int `json:"segment_filesize"` }
func (*Update) SegmentDurationStr ¶
func (*Update) SegmentFilesizeStr ¶
Click to show internal directories.
Click to hide internal directories.