Skip to content

Commit

Permalink
adding output messages
Browse files Browse the repository at this point in the history
  • Loading branch information
roffe committed Feb 3, 2018
1 parent 3469cc1 commit 3eb5461
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/controllers/health_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type HealthController struct {
}

func sendHeartBeat(channel chan<- *ControllerHeartbeat, controller string) {
glog.Infof("Send Heartbeat from %s", controller)
heartbeat := ControllerHeartbeat{
Component: controller,
Lastheartbeat: time.Now(),
Expand All @@ -31,7 +32,7 @@ func sendHeartBeat(channel chan<- *ControllerHeartbeat, controller string) {

func (hc *HealthController) Handler(w http.ResponseWriter, req *http.Request) {
w.WriteHeader(http.StatusOK)
w.Write([]byte("These aren't the droids you're looking for"))
w.Write([]byte("These aren't the droids you're looking for\n"))
}

func (hc *HealthController) Run(healthChan <-chan *ControllerHeartbeat, stopCh <-chan struct{}, wg *sync.WaitGroup) error {
Expand Down Expand Up @@ -60,8 +61,9 @@ func (hc *HealthController) Run(healthChan <-chan *ControllerHeartbeat, stopCh <
}
return nil
case heartbeat := <-healthChan:
glog.V(3).Infof("Received heartbeat from %s", heartbeat.Component)
glog.Infof("Received heartbeat from %s", heartbeat.Component)
case <-t.C:
glog.Infof("Health controller tick")
}
}

Expand Down

0 comments on commit 3eb5461

Please sign in to comment.