Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnectRabbitMQ ¶
func ConnectRabbitMQ(username, password, host, vhost string) (*amqp.Connection, error)
ConnectRabbitMQ will spawn a Connection
Types ¶
type RabbitClient ¶
type RabbitClient struct {
// contains filtered or unexported fields
}
RabbitClient is used to keep track of the RabbitMQ connection
func NewRabbitMQClient ¶
func NewRabbitMQClient(conn *amqp.Connection) (RabbitClient, error)
NewRabbitMQClient will connect and return a Rabbitclient with an open connection Accepts a amqp Connection to be reused, to avoid spawning one TCP connection per concurrent client
func (RabbitClient) Publish ¶
func (rc RabbitClient) Publish(ctx context.Context, event Event) error
func (RabbitClient) QueueDeclare ¶
func (rc RabbitClient) QueueDeclare() (amqp.Queue, error)
Click to show internal directories.
Click to hide internal directories.