Documentation ¶
Index ¶
- func Conn(user, password, host string, port int) (*amqp.Connection, error)
- func CreateDelayQueue(conn *amqp.Connection, queue string, consumers ...Consumer)
- func CreateQueue(conn *amqp.Connection, queue string, consumers ...Consumer)
- func Enqueue(conn *amqp.Connection, queue, body string) error
- func EnqueueDelay(conn *amqp.Connection, queue, body string, ttl int) error
- type Consumer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conn ¶
func Conn(user, password, host string, port int) (*amqp.Connection, error)
Conn 连接 rabbitmq
func CreateDelayQueue ¶
func CreateDelayQueue(conn *amqp.Connection, queue string, consumers ...Consumer)
CreateDelayQueue 创建一个延迟队列
func CreateQueue ¶
func CreateQueue(conn *amqp.Connection, queue string, consumers ...Consumer)
CreateQueue 创建一个队列
func EnqueueDelay ¶
func EnqueueDelay(conn *amqp.Connection, queue, body string, ttl int) error
EnqueueDelay 放入延迟队列
Types ¶
Click to show internal directories.
Click to hide internal directories.