rabbitmq

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FailOnError

func FailOnError(err error, msg string)

FailOnError mq fail

Types

type Client

type Client struct {
	Conn   *amqp.Connection
	Chs    map[string]*amqp.Channel
	Queues map[string]amqp.Queue
	Tracer opentracing.Tracer
	Closer io.Closer
}

Client ..

func NewClient

func NewClient(config *config.RabbitmqConfig, queueNames []string) (*Client, error)

NewClient ..

func NewClientFromEtcd

func NewClientFromEtcd(etcdCli *etcd.Client, queueNames []string) (mqCli *Client, err error)

NewClientFromEtcd init gorm from etcd config and watch config to update gorm

func (*Client) PublishMessage

func (c *Client) PublishMessage(ctx context.Context, exhcange, key string, immediate bool, msg amqp.Publishing) error

PublishMessage ..

Jump to

Keyboard shortcuts

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