| 11 | var log = logger.New("stateTracker") |
| 12 | |
| 13 | type StateTracker interface { |
| 14 | Get() interface{} |
| 15 | Set(interface{}) bool |
| 16 | |
| 17 | // The time that the StateTracker has spent being "previous" |
| 18 | // If already "desired", returns 0 |
| 19 | Duration(previous interface{}, desired interface{}) time.Duration |
| 20 | Wait(ctx context.Context, desired interface{}) bool |
| 21 | |
| 22 | NewListener() <-chan *Notification |
| 23 | RemoveListener(listener <-chan *Notification) |
| 24 | } |
| 25 | |
| 26 | type stateTracker struct { |
| 27 | cond *sync.Cond |
no outgoing calls
no test coverage detected