func (r *reporterState) TimedOut() bool {
	return r.timeout != 0 && time.Since(r.timestamp) > r.timeout
}
TimedOut checks whether the reporter is due for another report. This is the case when
the reports are configured to expire and the time since the last report exceeds the report timeout duration.
package health
import (
	"net"
	"net/http"
	"strconv"
	"sync"
	"time"
	log "github.com/sirupsen/logrus"
)
type HealthReport struct {
	Live  bool
	Ready bool
}
type reporterState struct {
	name string
	reports HealthReport
	timeout time.Duration
	latest HealthReport
	timestamp time.Time
}
func (r *reporterState) HasReadinessProblem() bool {
	if !r.reports.Ready {
		return false
	}
	if r.TimedOut() {
		log.WithField("name", r.name).Warn("Report timed out")
		return true
	}
	return !r.latest.Ready
}
func (r *reporterState) HasLivenessProblem() bool {
	if !r.reports.Live {
		return false
	}
	if r.TimedOut() {
		log.WithField("name", r.name).Warn("Report timed out")
		return true
	}
	return !r.latest.Live
}