producer

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

CliOptions ...

Functions

This section is empty.

Types

type Config

type Config struct {
	rabbitmq.Config
	QueueLength int64
}

Config ...

func (Config) CreateProducer

func (config Config) CreateProducer() (p Producer, err error)

CreateProducer ...

func (Config) ParseCli

func (config Config) ParseCli(ctx *cli.Context) Config

ParseCli ...

type Producer

type Producer struct {
	Config Config
	Conn   *amqp.Connection
	ProdCh *amqp.Channel
	ConCh  *amqp.Channel
}

Producer ...

func (*Producer) Close

func (p *Producer) Close()

Close ...

func (*Producer) ConsumeQueue

func (p *Producer) ConsumeQueue(queueName string) (resultChan <-chan amqp.Delivery, err error)

ConsumeQueue ...

func (*Producer) CreateQueue

func (p *Producer) CreateQueue(queueName string) (err error)

CreateQueue ...

func (*Producer) Publish

func (p *Producer) Publish(message []byte, routingKey string) error

Publish ...

Jump to

Keyboard shortcuts

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