kernel

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package kernel is the core of olive.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBout

func NewBout(showID string, showMap *syncmap.RWMap[string, Show], cfg *config.Config) (*bout, error)

Types

type Kernel

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

func New

func New(log *logrus.Logger, cfg *config.Config, shows []Show) *Kernel

func (*Kernel) DeleteShow

func (k *Kernel) DeleteShow(shows ...Show)

func (*Kernel) Done

func (k *Kernel) Done() <-chan struct{}

func (*Kernel) HandleShow

func (k *Kernel) HandleShow(shows ...Show)

func (*Kernel) IsValidPortalUser

func (k *Kernel) IsValidPortalUser(un, pw string) bool

func (*Kernel) Run

func (k *Kernel) Run()

func (*Kernel) Shutdown

func (k *Kernel) Shutdown(ctx context.Context)

func (*Kernel) UpdateConfig

func (k *Kernel) UpdateConfig(key, value string)

func (*Kernel) UpdateShow

func (k *Kernel) UpdateShow(shows ...Show)

type Show

type Show struct {
	ID           string    `json:"show_id"`
	Enable       bool      `json:"enable"`
	Platform     string    `json:"platform"`
	RoomID       string    `json:"room_id"`
	StreamerName string    `json:"streamer_name"`
	OutTmpl      string    `json:"out_tmpl"`
	Parser       string    `json:"parser"`
	SaveDir      string    `json:"save_dir"`
	PostCmds     string    `json:"post_cmds"`
	SplitRule    string    `json:"split_rule"`
	DateCreated  time.Time `json:"date_created"`
	DateUpdated  time.Time `json:"date_updated"`
}

Show represents an individual show.

func (*Show) CheckAndFix

func (s *Show) CheckAndFix(cfg *config.Config)

type SplitRule

type SplitRule struct {
	FileSize int64
	Duration string
	// contains filtered or unexported fields
}

func NewSplitRule

func NewSplitRule(str string) (*SplitRule, error)

func (*SplitRule) IsValid

func (sr *SplitRule) IsValid() bool

func (*SplitRule) Satisfy

func (sr *SplitRule) Satisfy(startTime time.Time, out string) bool

Jump to

Keyboard shortcuts

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