amqp

package
v0.0.0-...-552ec7c Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amqp

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

func NewAmqp

func NewAmqp(c *Config) *Amqp

func (*Amqp) Close

func (a *Amqp) Close()

func (*Amqp) Consume

func (a *Amqp) Consume(queue, consumer string, autoAck, exclusive, noLocal, noWait bool, args amqplib.Table, channelInit ChannelSetup, callback Callback)

func (*Amqp) Publish

func (a *Amqp) Publish(exchange, key string, mandatory, immediate bool, msg amqplib.Publishing)

type Callback

type Callback func(delivery amqplib.Delivery)

type ChannelSetup

type ChannelSetup func(ch *amqplib.Channel)

type Config

type Config struct {
	Username    string `yaml:"username"`
	Password    string `yaml:"password"`
	Host        string `yaml:"host"`
	Port        int    `yaml:"port"`
	VirtualHost string `yaml:"virtualHost"`
}

func (*Config) Url

func (c *Config) Url() string

Jump to

Keyboard shortcuts

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