common

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const MqUrl = "amqp://guest:guest@rabbitmq-mq:5672/"

Variables

This section is empty.

Functions

func FailOnError

func FailOnError(err error, msg string)

FailOnError 错误处理函数

Types

type RabbitMQ

type RabbitMQ struct {
	Conn    *amqp.Connection
	Channel *amqp.Channel
}

func NewRabbitMQ

func NewRabbitMQ() *RabbitMQ

NewRabbitMQ 拿到 rabbitmq 的 channel,轻量级 connection

func (RabbitMQ) Close

func (r RabbitMQ) Close()

Jump to

Keyboard shortcuts

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