Documentation ¶
Index ¶
- Constants
- func HandleError(err error, msg string)
- type AMQPObject
- func (q *AMQPObject) CloseMQ()
- func (q *AMQPObject) CreateExchange(ex Exchange) error
- func (q *AMQPObject) CreateQueue(que Queue) (*amqp.Queue, error)
- func (q *AMQPObject) DeleteQueue(queueName string) error
- func (q *AMQPObject) Listen(queueName string, routeKeys []string) (<-chan []byte, error)
- func (q *AMQPObject) Publish(exchangeName string, routeKeys []string, data []byte) error
- func (q *AMQPObject) Subcribe(exchangeName, queueName string, routeKeys []string)
- type Exchange
- type Queue
Constants ¶
View Source
const ( MyExchange = "ex-change" MyQueue = "q-ue-ue" MyExchangeType = "direct" )
Variables ¶
This section is empty.
Functions ¶
func HandleError ¶
Types ¶
type AMQPObject ¶
type AMQPObject struct {
// contains filtered or unexported fields
}
func InitConnect ¶
func InitConnect(addr string) (*AMQPObject, error)
func (*AMQPObject) CloseMQ ¶
func (q *AMQPObject) CloseMQ()
func (*AMQPObject) CreateExchange ¶
func (q *AMQPObject) CreateExchange(ex Exchange) error
func (*AMQPObject) CreateQueue ¶
func (q *AMQPObject) CreateQueue(que Queue) (*amqp.Queue, error)
func (*AMQPObject) DeleteQueue ¶
func (q *AMQPObject) DeleteQueue(queueName string) error
func (*AMQPObject) Listen ¶
func (q *AMQPObject) Listen(queueName string, routeKeys []string) (<-chan []byte, error)
func (*AMQPObject) Publish ¶
func (q *AMQPObject) Publish(exchangeName string, routeKeys []string, data []byte) error
func (*AMQPObject) Subcribe ¶
func (q *AMQPObject) Subcribe(exchangeName, queueName string, routeKeys []string)
Click to show internal directories.
Click to hide internal directories.