streamd v0.2.2: session uptimes, egress DNS, Support, agent/Widevine
All checks were successful
release / build-and-upload (push) Successful in 7m2s
All checks were successful
release / build-and-upload (push) Successful in 7m2s
Dashboard Live uptimes + Recent runs from stream_sessions; overview.recent_sessions. WireGuard netns resolv.conf + missing-deps WARN. Support donations card. Agent start/stop/update, job_backoff default off, wvkey ensure/venv, phonecap retries, modhost YAML enrich, DRM SetCredentials requires keys.
This commit is contained in:
parent
3ae1dd58b3
commit
a091922efa
34 changed files with 2391 additions and 154 deletions
|
|
@ -36,6 +36,16 @@ type Config struct {
|
|||
// an on-demand stream, or a scheduled event about to start — jump ahead
|
||||
// of routine refreshes in the queue.
|
||||
OnDemandPriority *bool `yaml:"ondemand_priority"`
|
||||
// JobBackoff enables exponential retry delays after a failed capture
|
||||
// (1m, 2m, 4m, 8m…). Default off — a single agent should retry ASAP.
|
||||
// Set job_backoff: true when several agents share the same streams.
|
||||
JobBackoff *bool `yaml:"job_backoff"`
|
||||
// Daemon / update (streamd agent start|stop|update)
|
||||
LogFile string `yaml:"log_file"` // default agent.log next to config / install root
|
||||
PIDFile string `yaml:"pid_file"` // default agent.pid
|
||||
Channel string `yaml:"channel"` // stable|beta for agent update
|
||||
Asset string `yaml:"asset"` // optional streamd-* asset override
|
||||
KeepOld *int `yaml:"keep_old"` // archived binaries under old/ (default 10)
|
||||
}
|
||||
|
||||
// PushedCapturesArePriority reports whether pushed captures jump the queue.
|
||||
|
|
@ -44,6 +54,12 @@ func (c Config) PushedCapturesArePriority() bool {
|
|||
return c.OnDemandPriority == nil || *c.OnDemandPriority
|
||||
}
|
||||
|
||||
// JobBackoffEnabled is the exponential multi-agent retry delay.
|
||||
// Defaults to false so a lone agent retries immediately after a failure.
|
||||
func (c Config) JobBackoffEnabled() bool {
|
||||
return c.JobBackoff != nil && *c.JobBackoff
|
||||
}
|
||||
|
||||
func (c Config) PollInterval() time.Duration {
|
||||
if c.PollIntervalSec <= 0 {
|
||||
return 30 * time.Second
|
||||
|
|
@ -125,6 +141,9 @@ func applyDefaults(cfg Config, root string) Config {
|
|||
if cfg.WVD != "" && !filepath.IsAbs(cfg.WVD) {
|
||||
cfg.WVD = filepath.Join(root, cfg.WVD)
|
||||
}
|
||||
if cfg.Python != "" && !filepath.IsAbs(cfg.Python) {
|
||||
cfg.Python = filepath.Join(root, cfg.Python)
|
||||
}
|
||||
if cfg.ModulesDir == "" {
|
||||
cfg.ModulesDir = filepath.Join(cfg.DataDir, "modules")
|
||||
} else if !filepath.IsAbs(cfg.ModulesDir) {
|
||||
|
|
@ -133,6 +152,25 @@ func applyDefaults(cfg Config, root string) Config {
|
|||
if cfg.ModulesSyncIntervalSec <= 0 {
|
||||
cfg.ModulesSyncIntervalSec = 300
|
||||
}
|
||||
if cfg.LogFile == "" {
|
||||
cfg.LogFile = "agent.log"
|
||||
}
|
||||
if !filepath.IsAbs(cfg.LogFile) {
|
||||
cfg.LogFile = filepath.Join(root, cfg.LogFile)
|
||||
}
|
||||
if cfg.PIDFile == "" {
|
||||
cfg.PIDFile = "agent.pid"
|
||||
}
|
||||
if !filepath.IsAbs(cfg.PIDFile) {
|
||||
cfg.PIDFile = filepath.Join(root, cfg.PIDFile)
|
||||
}
|
||||
if cfg.Channel == "" {
|
||||
cfg.Channel = "stable"
|
||||
}
|
||||
if cfg.KeepOld == nil {
|
||||
k := 10
|
||||
cfg.KeepOld = &k
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue