Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
Channel amqp.Channel wapper
type Config ¶ added in v0.0.3
type Config struct { Connection Connection Channel Channel }
type Connection ¶
Connection amqp.Connection wrapper
func NewRabbitMqConfig ¶
func NewRabbitMqConfig() *Connection
func (*Connection) Channel ¶
func (c *Connection) Channel() (*Channel, error)
This function is function to re-create channel , after reconnect connection to rabbitmq This function need to be called to re-create channel This function owned by Connection,and will return Connection it self. before call this function , need call NewRabbitMqConfig This function will retry to reconnect every 3 seconds
func (*Connection) Rabbitmq ¶
func (c *Connection) Rabbitmq(uri string) (*Connection, error)
This function is function to reconnect rabbitmq non ssl , this function need parameter rabbit mq host This function owned by Connection,and will return Connection it self. before call this function , need call NewRabbitMqConfig This function will retry to reconnect every 3 seconds
func (*Connection) RabbitmqSsl ¶
func (c *Connection) RabbitmqSsl(uri, certFile, keyFile, caCert, serverName string) (*Connection, error)
This function is function to reconnect rabbitmq ssl , this function need some parameter : - Uri = rabbit mq host - certFile = public key of ssl certificate - keyFile = private key of ssl certificate - caCert = caCert of ssl certificate - serverName= server name that will config in tls This function owned by Connection,and will return Connection it self. before call this function , need call NewRabbitMqConfig This function will retry to reconnect every 3 seconds