Documentation ¶
Overview ¶
Package config stores config type.
Index ¶
Constants ¶
View Source
const CoreConfigKey = "core_config"
Variables ¶
View Source
var DefaultConfig = Config{
PortalUsername: "olive",
PortalPassword: "olive",
LogDir: "",
SaveDir: "",
OutTmpl: `[{{ .StreamerName }}][{{ .RoomName }}][{{ now | date "2006-01-02 15-04-05"}}].flv`,
LogLevel: 5,
SnapRestSeconds: 15,
SplitRestSeconds: 60,
CommanderPoolSize: 1,
ParserMonitorRestSeconds: 300,
DouyinCookie: "",
KuaishouCookie: "",
PostCmdsRetryCount: 2,
}
Functions ¶
This section is empty.
Types ¶
type Bout ¶
type Bout interface { IsConfigValid() bool // show settings GetID() ID GetPlatform() string GetRoomID() string GetStreamerName() string GetOutFilename() string GetOutTmpl() string GetSaveDir() string GetParser() string GetPostCmds() []*exec.Cmd SatisfySplitRule(time.Time, string) bool // show events AddMonitor() error RemoveMonitor() error AddRecorder() error RemoveRecorder() error RestartRecorder() // tv Snap() error StreamURL() (string, bool) RoomName() (string, bool) StreamerName() (string, bool) SiteName() string }
type Config ¶
type Config struct { // portal PortalUsername string PortalPassword string // core LogDir string SaveDir string OutTmpl string LogLevel uint32 SnapRestSeconds uint SplitRestSeconds uint CommanderPoolSize uint ParserMonitorRestSeconds uint PostCmdsRetryCount int // tv DouyinCookie string KuaishouCookie string // biliup BiliupEnable bool CookieFilepath string Threads int64 MaxBytesPerSecond float64 }
func (*Config) CheckAndFix ¶
func (cfg *Config) CheckAndFix()
Click to show internal directories.
Click to hide internal directories.