Versions in this module Expand all Collapse all v0 v0.0.0 Apr 9, 2020 Changes in this version + const Blue + const DefaultFlushTimeout + const EventType + const Gray + const Green + const MaxKafkaHealthCheckInterval + const Red + const SignalUrl + const StateDefault + const Yellow + func GetHostHealthBytes(now time.Time) []byte + type Event struct + Data interface{} + Hostname string + Message string + Name string + Service string + State State + Timestamp int64 + Type string + Version string + type HealthMsg struct + Build string + Etype string + Event string + Hostname string + Timestamp int64 + type HttpSignal struct + func NewHttpSignal(url string) *HttpSignal + func (r *HttpSignal) RawReport(jsonPayload []byte) error + func (r *HttpSignal) Report(e Event, i interface{}) error + type IReporter interface + AddHostnameSuffix func(string) + AddStat func(key string, val interface{}) + ClearAll func() + ClearStat func(key string) + ClearStatFns func() + ClearStats func() + GetKafkaLogWriter func() io.Writer + GetStat func(key string) interface{} + Health func() Event + HealthHandler func(w http.ResponseWriter, req *http.Request) + Initialize func() (bool, error) + KafkaHealthy func() (bool, error) + PersistStat func(key string, val interface{}) + RegisterStatFn func(name string, fn func(reporter IReporter)) + ReportHealth func() + SetErrFn func(efn func(err error)) + SetHealth func(state State, message string) + SetStdOutFallback func(b bool) + SetTopic func(topic string) + StartIntervalReporting func(interval time.Duration) + Stop func() error + StopWithFinalState func(final State, msg string) error + type Reporter struct + Errfn func(err error) + func NewReporter(service, prefix, brokers string, errfn func(err error)) *Reporter + func (r *Reporter) AddHostnameSuffix(suffix string) + func (r *Reporter) AddStat(key string, val interface{}) + func (r *Reporter) ClearAll() + func (r *Reporter) ClearStat(key string) + func (r *Reporter) ClearStatFns() + func (r *Reporter) ClearStats() + func (r *Reporter) GetKafkaLogWriter() io.Writer + func (r *Reporter) GetStat(key string) interface{} + func (r *Reporter) Health() Event + func (r *Reporter) HealthHandler(w http.ResponseWriter, req *http.Request) + func (r *Reporter) Initialize() (bool, error) + func (r *Reporter) JsonStats() []byte + func (r *Reporter) KafkaHealthy() (bool, error) + func (r *Reporter) PersistStat(key string, val interface{}) + func (r *Reporter) RegisterStatFn(name string, fn func(reporter IReporter)) + func (r *Reporter) ReportHealth() + func (r *Reporter) SetErrFn(efn func(err error)) + func (r *Reporter) SetHealth(state State, message string) + func (r *Reporter) SetStdOutFallback(b bool) + func (r *Reporter) SetTopic(topic string) + func (r *Reporter) StartIntervalReporting(interval time.Duration) + func (r *Reporter) Stop() error + func (r *Reporter) StopWithFinalState(final State, msg string) error + type Signal interface + RawReport func([]byte) error + Report func(Event, interface{}) error + type State string + func (s *State) Set(h string) error + func (s State) String() string + type VersionMsg struct + Build string + Count uint64 + EventsSkipped int + Health State + Hostname string + Kernel string + LastEventTimestamp int64 + ModuleLoaded bool + Timestamp int64 + Version string