Versions in this module Expand all Collapse all v1 v1.0.1 May 10, 2021 v1.0.0 May 9, 2021 Changes in this version + func Connect() error + func Disconnect() error + func Init(opts ...Option) error + func Publish(topic string, msg *Message, opts ...PublishOption) error + func String() string + type Broker interface + Address func() string + Connect func() error + Disconnect func() error + Init func(...Option) error + Options func() Options + Publish func(topic string, m *Message, opts ...PublishOption) error + String func() string + Subscribe func(topic string, h Handler, opts ...SubscribeOption) (Subscriber, error) + var DefaultBroker Broker = NewBroker() + func NewBroker(opts ...Option) Broker + type Event interface + Ack func() error + Error func() error + Message func() *Message + Topic func() string + type Handler func(Event) error + type Message struct + Body []byte + Header map[string]string + type Option func(*Options) + func Addrs(addrs ...string) Option + func Codec(c codec.Marshaler) Option + func ErrorHandler(h Handler) Option + func Registry(r registry.Registry) Option + func Secure(b bool) Option + func TLSConfig(t *tls.Config) Option + type Options struct + Addrs []string + Codec codec.Marshaler + Context context.Context + ErrorHandler Handler + Registry registry.Registry + Secure bool + TLSConfig *tls.Config + type PublishOption func(*PublishOptions) + type PublishOptions struct + Context context.Context + type SubscribeOption func(*SubscribeOptions) + func DisableAutoAck() SubscribeOption + func Queue(name string) SubscribeOption + func SubscribeContext(ctx context.Context) SubscribeOption + type SubscribeOptions struct + AutoAck bool + Context context.Context + Queue string + func NewSubscribeOptions(opts ...SubscribeOption) SubscribeOptions + type Subscriber interface + Options func() SubscribeOptions + Topic func() string + Unsubscribe func() error + func Subscribe(topic string, handler Handler, opts ...SubscribeOption) (Subscriber, error) Incompatible versions in this module v2.3.0+incompatible May 9, 2021