rabbitmq

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(amqpURI, exchange, exchangeType, routingKey, body string, reliable bool) error

Types

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(amqpURI, exchange, exchangeType, queueName, key, ctag string) (*Consumer, error)

func (*Consumer) Shutdown

func (c *Consumer) Shutdown() error

type Registry

type Registry struct {
}

func (*Registry) DoConsumer

func (r *Registry) DoConsumer(amqpURI, exchange, exchangeType, routingKey, queueName string) (*Consumer, error)

消费消息

func (*Registry) DoPublish

func (r *Registry) DoPublish(amqpURI, exchange, exchangeType, routingKey, body string, reliable bool) error

发送消息

func (*Registry) Register

func (r *Registry) Register(host string, port int, user string, password string) string

获取rabbitMq 连接地址

type RegistryClient

type RegistryClient interface {
	Register(host string, port int, user string, password string) string
	DoPublish(amqpURI, exchange, exchangeType, routingKey, body string, reliable bool) error
	DoConsumer(amqpURI, exchange, exchangeType, routingKey, queue string) (*Consumer, error)
}

func NewRegistryClient

func NewRegistryClient() RegistryClient

Jump to

Keyboard shortcuts

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