rabbitmq

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

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

func NewConsumer

func NewConsumer(amqpURI string) (*Consumer, error)

func (*Consumer) Close

func (p *Consumer) Close() error

关闭

func (*Consumer) Consumer

func (p *Consumer) Consumer(ctx context.Context, exchange, exchangeType, queueName, key, tag string, handle func(string, uint64, []byte) error)

消费

type Payload

type Payload struct {
	Exchange     string
	ExchangeType string
	QueueName    string
	Key          string
	Tag          string
	Handle       func(string, uint64, []byte) error
}

type Producer

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

func NewProducer

func NewProducer(amqpURI string) (*Producer, error)

初始化

func (*Producer) Close

func (p *Producer) Close() error

关闭

func (*Producer) Producer

func (p *Producer) Producer(exchange, exchangeType, queueName, routingKey, body string, reliable bool) error

生产

Jump to

Keyboard shortcuts

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