define playback worker status

This commit is contained in:
Dmitry Sergeev
2026-08-27 09:38:35 +03:00
parent 8bb48d51ea
commit 418d0fc102
2 changed files with 48 additions and 0 deletions
+21
View File
@@ -1,5 +1,15 @@
package playback
import "time"
type Unit uint8
const (
UnitVideo Unit = iota
UnitAudio
UnitSync
)
type State uint8
const (
@@ -10,3 +20,14 @@ const (
StateFailed
StateStopping
)
type Status struct {
Unit Unit
State State
Attempt int
FailedAttempts int
RetryIn time.Duration
Err error
}
type StatusObserver func(Status)