package playback import "time" type Unit uint8 const ( UnitVideo Unit = iota UnitAudio UnitSync ) type State uint8 const ( StateIdle State = iota StateConnecting StatePlaying StateReconnecting StateFailed StateStopping ) type Status struct { Unit Unit State State Attempt int FailedAttempts int RetryIn time.Duration Err error } type StatusObserver func(Status)