Skip to content
Snippets Groups Projects
Commit 60fd10e3 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Add health event reporter

parent 15037876
No related branches found
No related tags found
3 merge requests!23Release,!13Hotfix/no host cooldown + return sende2e TS,!11Client Event Reporting API
......@@ -11,6 +11,7 @@ package network
// and intraclient state are accessible through the context object.
import (
"fmt"
"github.com/pkg/errors"
"gitlab.com/elixxir/client/interfaces"
"gitlab.com/elixxir/client/interfaces/params"
......@@ -110,6 +111,12 @@ func NewManager(session *storage.Session, switchboard *switchboard.Switchboard,
return nil, err
}
// Report health events
m.Internal.Health.AddFunc(func(isHealthy bool) {
m.Internal.Events.Report(5, "Health", "IsHealthy",
fmt.Sprintf("%v", isHealthy))
})
//create sub managers
m.message = message.NewManager(m.Internal, m.param.Messages, m.NodeRegistration, m.sender)
m.round = rounds.NewManager(m.Internal, m.param.Rounds, m.message.GetMessageReceptionChannel(), m.sender)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment