Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
MqUrl = fmt.Sprintf("amqp://%s:%s@%s:%d/%v",
config.Viper.GetString("server.username"),
config.Viper.GetString("server.password"),
config.Viper.GetString("server.host"),
config.Viper.GetInt("server.port"),
config.Viper.GetString("server.vhost"),
)
)
Functions ¶
Types ¶
type RabbitMQ ¶
type RabbitMQ struct { //队列名称 QueueName string //交换机名称 Exchange string //bind Key 名称 Key string //连接信息 Mqurl string Queue amqp.Queue // contains filtered or unexported fields }
rabbitMQ结构体
func NewRabbitMQ ¶
创建结构体实例
func NewRabbitMQSimple ¶
创建简单模式下RabbitMQ实例
func (*RabbitMQ) ConsumeSimple ¶
ConsumeSimple simple 模式下消费者
func (*RabbitMQ) DeclareQueue ¶
Click to show internal directories.
Click to hide internal directories.