Documentation ¶
Index ¶
- Constants
- type Handler
- type MetricsHandler
- type NilMetrics
- type Option
- func SetConsumerRegisterTopic(topic string) Option
- func SetCurrentConsumersTopic(topic string) Option
- func SetHeartbeatTickerTime(ti time.Duration) Option
- func SetHeartbeatTopic(topic string) Option
- func SetLogger(l logrus.FieldLogger) Option
- func SetMetrics(m MetricsHandler) Option
- func SetMetricsTimeout(t time.Duration) Option
Constants ¶
View Source
const ( PublisherTopic = "peer-heartbeat" ConsumerRegisterTopic = "peer-consumer-register" CurrentConsumersTopic = "peer-consumers" TickerTime = 30 * time.Second MetricsTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func (*Handler) GetConsumers ¶
func (*Handler) ListenForConsumers ¶
func (h *Handler) ListenForConsumers()
func (*Handler) ListenForHeartbeatPublisher ¶
func (h *Handler) ListenForHeartbeatPublisher()
func (*Handler) StartHeartbeatPublisher ¶
func (h *Handler) StartHeartbeatPublisher()
type MetricsHandler ¶ added in v0.0.2
type NilMetrics ¶ added in v0.0.2
type NilMetrics struct { }
func NewNilMetrics ¶ added in v0.0.2
func NewNilMetrics() *NilMetrics
func (*NilMetrics) RecordConsumerRegistered ¶ added in v0.0.2
func (m *NilMetrics) RecordConsumerRegistered(ctx context.Context, id string, current int)
func (*NilMetrics) ResetConsumerRegistered ¶ added in v0.0.4
func (m *NilMetrics) ResetConsumerRegistered(ctx context.Context)
type Option ¶
type Option func(h *Handler)
func SetCurrentConsumersTopic ¶ added in v0.0.7
func SetHeartbeatTickerTime ¶
func SetHeartbeatTopic ¶
func SetLogger ¶
func SetLogger(l logrus.FieldLogger) Option
func SetMetrics ¶ added in v0.0.2
func SetMetrics(m MetricsHandler) Option
func SetMetricsTimeout ¶ added in v0.0.6
Click to show internal directories.
Click to hide internal directories.