| 123456789101112131415161718192021 |
- package global
- import "github.com/streadway/amqp"
- // RabbitMQ 总线结构体
- type RabbitMQ struct {
- Connection *amqp.Connection
- Channel *amqp.Channel
- }
- // MQPacket 与总线交互的数据体
- type MQPacket struct {
- FunCode uint32 // 功能码
- SessionId uint32 // 数据包的sid
- Data *[]byte // 业务数据体
- }
- // MsgProcesser 消息处理者接口
- type MsgProcesser interface {
- Process(msg *[]byte)
- }
|