amqp

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2022 License: Apache-2.0 Imports: 9 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

Types

type ChannelManager

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

type Client added in v0.1.14

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

func NewPublisher

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

func (*Client) Close added in v0.1.14

func (p *Client) Close() error

func (*Client) Publish added in v0.1.14

func (p *Client) Publish(ctx context.Context, opts PublishOptions) error

type Manager added in v0.1.14

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

func NewChannelManager

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

func (*Manager) Channel added in v0.1.14

func (m *Manager) Channel() *amqp.Channel

func (*Manager) Close added in v0.1.14

func (m *Manager) 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