rabbitmq

package
v0.0.0-...-b015d54 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TopicQueue

type TopicQueue struct {
	E, R, Q string // exchange, routingKey, queueName
	// contains filtered or unexported fields
}

func NewTopicQueue

func NewTopicQueue(uri, exchange, routingKey, queueName string) (queue *TopicQueue, err error)

create Receiver uri: fmt.Sprintf("amqp://%s:%s@%s:%s%s", user, passwd, host, port, vhost)

func (*TopicQueue) Close

func (queue *TopicQueue) Close()

func (*TopicQueue) NewReceiver

func (queue *TopicQueue) NewReceiver(customer string) (rece *TopicReceiver, err error)

type TopicReceiver

type TopicReceiver struct {
	TopicQueue
	D <-chan amqp.Delivery
}

func NewTopicReceiver

func NewTopicReceiver(uri, exchange, routingKey, queueName, customer string) (
	rec *TopicReceiver, err error)

create Receiver

func (*TopicReceiver) Read

func (rec *TopicReceiver) Read() (bts []byte, err error)

type TopicSender

type TopicSender struct {
	E, R string
	// contains filtered or unexported fields
}

func NewTopicSender

func NewTopicSender(uri, exchange, routingKey string) (sender *TopicSender, err error)

func (*TopicSender) Close

func (sender *TopicSender) Close()

func (*TopicSender) Emit

func (sender *TopicSender) Emit(bts []byte) (err error)

Jump to

Keyboard shortcuts

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