Files
HomeOps-Hub/hub/internal/service/connection_manager/interface.go
T

28 lines
554 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
}
type heartbeatStore interface {
CreateHeartbeat(ctx context.Context, heartbeat domainHub.CreateHeartbeatModel) error
}
type statusAgent interface {
Offline()
Online()
}
type statusNotifier interface {
New(AgentID string) statusAgent
}