Refactor: Simplify LoginClient, replace Account struct with strom.Account, add Ticker module, and enhance configuration handling

This commit is contained in:
adman
2025-11-26 22:24:47 +01:00
parent 4f5b6441c8
commit 978555bf10
9 changed files with 306 additions and 74 deletions
+8
View File
@@ -10,6 +10,7 @@ type HandlerInst interface {
}
type OnStart struct{}
type OnLoopCycle struct{}
var HandlerDone = errors.New("handler done")
@@ -53,6 +54,13 @@ func (c *Conn) Start(inst HandlerInst) (err error) {
return
}
err = FireEvent(inst, event, handlers)
if err != nil {
break
}
err = FireEvent(inst, OnLoopCycle{}, handlers)
}
if errors.Is(err, HandlerDone) {
err = nil
}
return
}