Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RabbitMQConnection ¶
type RabbitMQConnection struct {
ConnectionStringSource string
Connection *amqp.Connection
Queue string
HealthCheckURL string
Host string
Port string
User string
Pass string
Channel *amqp.Channel
Logger log.Logger
Connected bool
}
RabbitMQConnection is a hub which deal with rabbitmq connections.
func (*RabbitMQConnection) Connect ¶
func (rc *RabbitMQConnection) Connect() error
Connect keeps a singleton connection with rabbitmq.
func (*RabbitMQConnection) EnsureChannel ¶ added in v2.3.0
func (rc *RabbitMQConnection) EnsureChannel() error
EnsureChannel ensures that the channel is open and connected.
func (*RabbitMQConnection) GetNewConnect ¶
func (rc *RabbitMQConnection) GetNewConnect() (*amqp.Channel, error)
GetNewConnect returns a pointer to the rabbitmq connection, initializing it if necessary.
func (*RabbitMQConnection) HealthCheck ¶
func (rc *RabbitMQConnection) HealthCheck() bool
HealthCheck rabbitmq when the server is started
Click to show internal directories.
Click to hide internal directories.