Versions in this module Expand all Collapse all v2 v2.0.0 Feb 7, 2022 Changes in this version + var JSONMarshaller = &jsonMarshaller + func MatchAll(_ string) bool + func MatchRegexp(expression string) func(topic string) bool + func Wait(done func()) <-chan struct + type Logger interface + Debugf func(format string, values ...interface{}) + Errorf func(format string, values ...interface{}) + Tracef func(format string, values ...interface{}) + type Marshaller interface + Marshal func(interface{}) ([]byte, error) + Unmarshal func([]byte, interface{}) error + type Metrics interface + Consumed func(ident string, duration time.Duration) + Dequeued func(ident string) + Enqueued func(ident string) + Published func(topic string) + Subscribed func() + Unsubscribed func() + type Multiplexer interface + Add func(topic string, handler interface{}) error + AddMatch func(matcher func(string) bool, handler interface{}) error + Unsubscribe func() + type SimpleHub struct + func NewSimpleHub(config *SimpleHubConfig) *SimpleHub + func (h *SimpleHub) NewMultiplexer() SimpleMultiplexer + func (h *SimpleHub) Publish(topic string, data interface{}) func() + func (h *SimpleHub) Subscribe(topic string, handler func(string, interface{})) func() + func (h *SimpleHub) SubscribeMatch(matcher func(string) bool, handler func(string, interface{})) func() + type SimpleHubConfig struct + Clock clock.Clock + Logger Logger + Metrics Metrics + type SimpleMultiplexer interface + Add func(topic string, handler func(string, interface{})) + AddMatch func(matcher func(string) bool, handler func(string, interface{})) + Unsubscribe func() + type StructuredHub struct + func NewStructuredHub(config *StructuredHubConfig) *StructuredHub + func (h *StructuredHub) NewMultiplexer() (Multiplexer, error) + func (h *StructuredHub) Publish(topic string, data interface{}) (func(), error) + func (h *StructuredHub) Subscribe(topic string, handler interface{}) (func(), error) + func (h *StructuredHub) SubscribeMatch(matcher func(string) bool, handler interface{}) (func(), error) + type StructuredHubConfig struct + Annotations map[string]interface{} + Clock clock.Clock + Logger Logger + Marshaller Marshaller + Metrics Metrics + PostProcess func(map[string]interface{}) (map[string]interface{}, error)