gorabbitmq

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 4 Imported by: 0

README

go-rabbitmq

Documentation

Index

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 Enqueue

func Enqueue(conn *amqp.Connection, queue, body string) error

Enqueue 放入队列

func EnqueueDelay

func EnqueueDelay(conn *amqp.Connection, queue, body string, ttl int) error

EnqueueDelay 放入延迟队列

Types

type Consumer

type Consumer func(amqp.Delivery) error

Consumer 队列消费者

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL