Documentation ¶
Index ¶
- func Redis() *redis.Client
- type ExchangeEntity
- type MessageEntity
- type MqController
- func (m *MqController) ExchangeHandler(w http.ResponseWriter, r *http.Request)
- func (m *MqController) PublishHandler(w http.ResponseWriter, r *http.Request)
- func (m *MqController) QueueBindHandler(w http.ResponseWriter, r *http.Request)
- func (m *MqController) QueueHandler(w http.ResponseWriter, r *http.Request)
- type QueueBindEntity
- type QueueEntity
- type RabbitMQ
- func (r *RabbitMQ) BindQueue(queue, exchange string, keys []string, nowait bool) (err error)
- func (r *RabbitMQ) Close() (err error)
- func (r *RabbitMQ) Connect() (err error)
- func (r *RabbitMQ) ConsumeQueue(queue string, message chan []byte) (err error)
- func (r *RabbitMQ) DeclareExchange(name, typ string, durable, autodelete, nowait bool) (err error)
- func (r *RabbitMQ) DeclareQueue(name string, durable, autodelete, exclusive, nowait bool) (err error)
- func (r *RabbitMQ) DeleteExchange(name string) (err error)
- func (r *RabbitMQ) DeleteQueue(name string) (err error)
- func (r *RabbitMQ) Publish(exchange, key string, deliverymode, priority uint8, body string) (err error)
- func (r *RabbitMQ) UnBindQueue(queue, exchange string, keys []string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ExchangeEntity ¶
type MessageEntity ¶
type MessageEntity struct { Exchange string `json:"exchange"` Key string `json:"key"` DeliveryMode uint8 `json:"deliverymode"` Priority uint8 `json:"priority"` Body string `json:"body"` }
MessageEntity Entity for HTTP Request Body: Message/Exchange/Queue/QueueBind JSON Input
type MqController ¶
type MqController struct{}
func (*MqController) ExchangeHandler ¶
func (m *MqController) ExchangeHandler(w http.ResponseWriter, r *http.Request)
func (*MqController) PublishHandler ¶
func (m *MqController) PublishHandler(w http.ResponseWriter, r *http.Request)
func (*MqController) QueueBindHandler ¶
func (m *MqController) QueueBindHandler(w http.ResponseWriter, r *http.Request)
func (*MqController) QueueHandler ¶
func (m *MqController) QueueHandler(w http.ResponseWriter, r *http.Request)
QueueHandler HTTP Handlers
type QueueBindEntity ¶
type QueueEntity ¶
type RabbitMQ ¶
type RabbitMQ struct {
// contains filtered or unexported fields
}
RabbitMQ Operate Wrapper
func (*RabbitMQ) ConsumeQueue ¶
func (*RabbitMQ) DeclareExchange ¶
func (*RabbitMQ) DeclareQueue ¶
func (*RabbitMQ) DeleteExchange ¶
func (*RabbitMQ) DeleteQueue ¶
Click to show internal directories.
Click to hide internal directories.