rabbitmq

package
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL