mq

package
v0.0.0-...-9275613 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	Host            string
	User            string
	Password        string
	ConnectAttempts int
	ConnectDelay    time.Duration
}

func ProvideConfigFromEnviron

func ProvideConfigFromEnviron(log common.Logger, environ common.Environ) (conf Config, err error)

type ConnectionState

type ConnectionState struct {
	Conn  *amqp.Conn
	Error error
}

type MQ

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

func New

func New(config Config, log common.Logger) MQ

func ProvideMQ

func ProvideMQ(config Config, log common.Logger) MQ

func (MQ) GetConnection

func (mq MQ) GetConnection(ctx context.Context) (*amqp.Conn, error)

func (MQ) GetSession

func (mq MQ) GetSession(ctx context.Context) (*amqp.Session, error)

func (MQ) ManageConnectionAsync

func (mq MQ) ManageConnectionAsync(ctx context.Context) (err error)

func (MQ) Reconnect

func (mq MQ) Reconnect(ctx context.Context)

Jump to

Keyboard shortcuts

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