amqp

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppID             = "hephaestus"
	MandatoryDelivery = true
	ImmediateDelivery = false

	ExchangeType       = "direct"
	ExchangeDurable    = true
	ExchangeAutoDelete = false
	ExchangeInternal   = false
	ExchangeNoWait     = false

	QueueDurable    = true
	QueueAutoDelete = false
	QueueExclusive  = false
	QueueNoWait     = false
)

Variables

This section is empty.

Functions

func Dial

func Dial(url string) (*amqp.Connection, *amqp.Channel, error)

func IsNotFound

func IsNotFound(err error) bool

func NewChannelManager

func NewChannelManager(log logr.Logger, url string) (*channelManager, error)

func NewPublisher

func NewPublisher(log logr.Logger, url string) (*publisher, error)

Types

type ChannelManager

type ChannelManager interface {
	Channel() *amqp.Channel
	Close() error
}

type PublishOptions

type PublishOptions struct {
	ExchangeName string
	QueueName    string
	ContentType  string
	Body         []byte
}

type Publisher

type Publisher interface {
	Publish(PublishOptions) error
	Close() error
}

Jump to

Keyboard shortcuts

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