mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 20:05:17 +03:00
feat: add connect stream to connection manager
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
package notifier
|
||||
|
||||
import "github.com/lorsanstand/HomeOps-Hub/hub/internal/service/connection_manager"
|
||||
|
||||
// Временная заглушка
|
||||
type StatusNotifier struct {
|
||||
}
|
||||
|
||||
type Status struct {
|
||||
agentID string
|
||||
online bool
|
||||
}
|
||||
|
||||
func NewStatusNotifier() *StatusNotifier {
|
||||
return &StatusNotifier{}
|
||||
}
|
||||
|
||||
func (s *StatusNotifier) New(agentID string) connection_manager.StatusAgent {
|
||||
return &Status{agentID: agentID}
|
||||
}
|
||||
|
||||
func (s *Status) Online() {
|
||||
s.online = true
|
||||
}
|
||||
|
||||
func (s *Status) Offline() {
|
||||
s.online = false
|
||||
}
|
||||
Reference in New Issue
Block a user