producer

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAddr         = "amqp://root:123456@127.0.0.1:5672"
	DefaultVirtualHost  = "rmq"
	DefaultQueueName    = "rmq-queue"
	DefaultRoutingKey   = "rmq-key"
	DefaultExchangeName = "rmq-ex"
	DefaultExchangeType = "direct"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MQProducer

type MQProducer struct {
	Producer *producer
}

func (*MQProducer) Init

func (p *MQProducer) Init(options ...Option)

Init creates a new consumer state instance, and automatically attempts to connect to the server.

type Option

type Option func(*Options)

func Addr

func Addr(addr string) Option

func Args

func Args(args map[string]interface{}) Option

func ExchangeName

func ExchangeName(exchangeName string) Option

func ExchangeType

func ExchangeType(exchangeType string) Option

func QueueName

func QueueName(queueName string) Option

func RoutingKey

func RoutingKey(routingKey string) Option

func VirtualHost

func VirtualHost(virtualHost string) Option

type Options

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

Jump to

Keyboard shortcuts

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