Add architecture for multiple managers

using the chain of responsibility pattern.
This commit is contained in:
Maximilian Paß
2022-01-19 21:23:04 +01:00
parent dd1d27e393
commit ba43f667c2
20 changed files with 732 additions and 442 deletions

View File

@@ -37,11 +37,11 @@ type InactivityTimerImplementation struct {
duration time.Duration
state TimerState
runner Runner
manager Manager
manager Accessor
mu sync.Mutex
}
func NewInactivityTimer(runner Runner, manager Manager) InactivityTimer {
func NewInactivityTimer(runner Runner, manager Accessor) InactivityTimer {
return &InactivityTimerImplementation{
state: TimerInactive,
runner: runner,