rabbit

package module
v0.0.0-...-78aecf6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 3 Imported by: 0

README

rabbit

rabbit pkg

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumeParams

type ConsumeParams struct {
	Queue, ConsumerName                 string
	AutoAck, Exclusive, NoLocal, NoWait bool
	Args                                map[string]interface{}
}

type MessageBroker

type MessageBroker interface {
	Consume(*ConsumeParams) <-chan amqp.Delivery
	Publish(*PublishParams) error
}

type PublishParams

type PublishParams struct {
	Exchange, Routing    string
	Mandatory, Immediate bool
	Body                 []byte
}

type Rabbit

type Rabbit struct {
	User, Password, Host, VHost, Port, ConnectionUrl string
	Connection                                       *amqp.Connection
	Chan                                             *amqp.Channel
}

func (*Rabbit) BuilderConnectionUrl

func (rabbit *Rabbit) BuilderConnectionUrl() string

func (*Rabbit) Channel

func (rabbit *Rabbit) Channel() *amqp.Channel

func (*Rabbit) Connect

func (rabbit *Rabbit) Connect() *amqp.Connection

func (*Rabbit) Consume

func (rabbit *Rabbit) Consume(p *ConsumeParams) <-chan amqp.Delivery

func (*Rabbit) Publish

func (rabbit *Rabbit) Publish(p *PublishParams) error

Jump to

Keyboard shortcuts

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