Versions in this module Expand all Collapse all v0 v0.31.5 Apr 16, 2019 Changes in this version + type DisconnectCallbackFunc func() + type EventCallbackFunc func(em *EventMetric, data interface{}) + type EventMeter struct + func NewEventMeter(addr string, unmarshalEvent EventUnmarshalFunc) *EventMeter + func (em *EventMeter) GetMetric(query string) (*EventMetric, error) + func (em *EventMeter) RegisterDisconnectCallback(f DisconnectCallbackFunc) + func (em *EventMeter) RegisterLatencyCallback(f LatencyCallbackFunc) + func (em *EventMeter) SetLogger(l log.Logger) + func (em *EventMeter) Start() error + func (em *EventMeter) Stop() + func (em *EventMeter) String() string + func (em *EventMeter) Subscribe(query string, cb EventCallbackFunc) error + func (em *EventMeter) Unsubscribe(query string) error + type EventMetric struct + Count int64 + ID string + LastHeard time.Time + MaxDuration int64 + MinDuration int64 + Rate1 float64 + Rate15 float64 + Rate5 float64 + RateMean float64 + Started time.Time + func (metric *EventMetric) Copy() *EventMetric + type EventUnmarshalFunc func(b json.RawMessage) (string, events.EventData, error) + type LatencyCallbackFunc func(meanLatencyNanoSeconds float64)