Documentation ¶
Index ¶
- func NewConnection(conf *Config, opts ...Option) (*amqp.ConnectionWrapper, error)
- func NewLogger(handler log.Logger) watermill.LoggerAdapter
- func NewPubSub(conf *Config, opts ...Option) (publisher message.Publisher, subscriber message.Subscriber, err error)
- func NewPublisher(conf *Config, opts ...Option) (*amqp.Publisher, error)
- func NewSubscriber(conf *Config, opts ...Option) (*amqp.Subscriber, error)
- type Config
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶
func NewConnection(conf *Config, opts ...Option) (*amqp.ConnectionWrapper, error)
NewConnection 链接 已默认支持重连机制: amqp.DefaultReconnectConfig
func NewPubSub ¶
func NewPubSub(conf *Config, opts ...Option) (publisher message.Publisher, subscriber message.Subscriber, err error)
NewPubSub 发布订阅 注意:Close 同步调用了 conn.Close
func NewPublisher ¶
NewPublisher 发布者 注意:Close 同步调用了 conn.Close
func NewSubscriber ¶
func NewSubscriber(conf *Config, opts ...Option) (*amqp.Subscriber, error)
NewSubscriber 订阅者 注意:Close 同步调用了 conn.Close
Types ¶
type Config ¶
type Config struct { Url string TlsAddress string TlsCaPem string TlsCertPem string TlsKeyPem string }
Config rabbitmq config
Click to show internal directories.
Click to hide internal directories.