mirror of
https://github.com/lorsanstand/HomeOps-Hub.git
synced 2026-06-19 16:45:15 +03:00
29 lines
569 B
Go
29 lines
569 B
Go
package connection_manager
|
|
|
|
import (
|
|
"context"
|
|
|
|
pb "github.com/lorsanstand/HomeOps-Hub/api/gen/homeops"
|
|
domainHub "github.com/lorsanstand/HomeOps-Hub/hub/internal/domain"
|
|
)
|
|
|
|
type streamConn interface {
|
|
Send(request *pb.ServerCommandRequest) error
|
|
Recv() (*pb.AgentEvent, error)
|
|
Context() context.Context
|
|
Close() error
|
|
}
|
|
|
|
type heartbeatStore interface {
|
|
CreateHeartbeat(ctx context.Context, heartbeat domainHub.CreateHeartbeatModel) error
|
|
}
|
|
|
|
type statusAgent interface {
|
|
Offline()
|
|
Online()
|
|
}
|
|
|
|
type statusNotifier interface {
|
|
New(AgentID string) statusAgent
|
|
}
|