define playback worker status
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user