Skip to content

Commit

Permalink
Add startheartbeat as public for testing again
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Jan 31, 2024
1 parent dc84aef commit 280e5be
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 2 deletions.
1 change: 1 addition & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ type SubscriptionManagerInterface interface {
type HeartbeatManagerInterface interface {
IsHeartbeatRunning() bool
SetLocalFeature(entity EntityLocalInterface, feature FeatureLocalInterface)
StartHeartbeat() error
StopHeartbeat()
}

Expand Down
45 changes: 45 additions & 0 deletions mocks/HeartbeatManagerInterface.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spine/heartbeat_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ func (c *HeartbeatManager) SetLocalFeature(entity api.EntityLocalInterface, feat
c.mux.Unlock()

// start creating heartbeats
_ = c.startHeartbeat()
_ = c.StartHeartbeat()
}

// Start setting heartbeat data
// Make sure the a required FeatureTypeTypeDeviceDiagnosis with the role server is present
// otherwise this will end with an error
// Note: Remote features need to have a subscription to get notifications
func (c *HeartbeatManager) startHeartbeat() error {
func (c *HeartbeatManager) StartHeartbeat() error {
timeout, err := c.heartBeatTimeout.GetTimeDuration()
if err != nil {
return err
Expand Down

0 comments on commit 280e5be

Please sign in to comment.